abi Questions
2
Solved
I have a project with multiple smart contracts locally and I want to generate the ABI of my sc.sol smart contract. I do wish to perform this locally using forge or foundry.
I know it is possible to...
Ankle asked 21/9, 2023 at 10:39
5
I recently installed LLVM v8.0.0 (on RHEL 7.4). I am going through the LLVM Kaleidoscope tutorial to learn how to use the system, but am running into an issue linking.
Per the tutorial (end of cha...
Scatter asked 16/12, 2018 at 18:1
2
I often forget the registers that I need to use for each argument in a syscall, and everytime I forget I just visit this question.
The right order for integer/pointer args to x86_64 user-space func...
Balloon asked 14/9, 2020 at 21:21
1
I narrowed down a problem in my GUI code to SetWindowTextW(HWND, wchar_t *) silently failing if the new window title is not aligned to two bytes. In this case, SetWindowText() returns 1 (success) b...
Saury asked 5/2 at 21:9
1
Solved
Consider the following two files on a Linux system:
use_message.cpp
#include <iostream>
extern const char* message;
void print_message();
int main() {
std::cout << message << '...
Denunciation asked 19/2 at 21:42
2
Solved
I am coming back to C# after a long time and was trying to catch up using the book C# 10 in a Nutshell.
The author there mentions that changing a property's accessor from init to set or vice versa ...
Fingering asked 15/9, 2023 at 8:33
3
At the C level, the recommendation is typically to pass anything bigger than word size (8 bytes on x86-64) by pointer, and anything smaller by value (implying by register). The argument is supposed...
1
Take this simple example:
struct has_destruct_t {
int a;
~has_destruct_t() {}
};
struct no_destruct_t {
int a;
};
int bar_no_destruct(no_destruct_t);
int foo_no_destruct(void) {
no_destruct_...
Arroba asked 15/5, 2023 at 18:35
12
Solved
I am new to Linux system programming and I came across API and ABI while reading
Linux System Programming.
Definition of API:
An API defines the interfaces by which
one piece of software communica...
Hailee asked 24/9, 2010 at 5:18
3
Solved
In x86/amd64 world sizeof(long long) is 8.
Let me quote quite insightful 8 year old mail by Zack Weinberg:
Scott Robert Ladd writes:
On a 64-bit AMD64 architecture, GCC defines long long a...
6
Solved
I'm having some trouble understanding the difference between caller and callee saved registers and when to use what.
I am using the MSP430
:
procedure:
mov.w #0,R7
mov.w #0,R6
add.w R6,R7
in...
Night asked 13/2, 2012 at 21:51
4
Solved
It is highly recommended when creating a 64-bit kernel (for x86_64 platform), to instruct the compiler not to use the 128-byte Red Zone that the user-space ABI does. (For GCC the compiler flag is -...
3
Solved
The "ARM Architecture Procedure Calling Standard" (AAPCS/EABI) states (5.1.1) that
"The role of register r9 is platform specific."
but
"A virtual platform [...] may designate r9 as an additiona...
Macfadyn asked 24/10, 2011 at 17:15
1
Solved
In his talk Jason Turner proposed to break the C++ ABI to keep the language moving forward. He also mentioned that if needed due to compatibility reasons, C++ ABI changes can be isolated by wrappin...
2
I'm having trouble finding the good documentation for writing 64-bit assembly on MacOS.
The 64-bit SysV ABI says the following in section A.2.1 and this SO post quotes it:
A system-call is do...
Flocculent asked 15/12, 2017 at 14:37
2
Solved
I'm porting some AArch64/ARM64/Apple Silicon assembly code from Linux to macOS.
This code uses all 31 available registers (stack pointer doesn't count) to avoid almost all cases of spilling; the Li...
Tamelatameless asked 17/2, 2022 at 4:28
2
How can I interact with an already deployed contract on ether(not mine) using Remix without the source code, but I have the ABI.
The reason I want to do it is because some contract has more than 20...
Summons asked 1/9, 2021 at 4:47
6
Solved
I know that an "undefined behaviour" in C++ can pretty much allow the compiler to do anything it wants. However, I had a crash that surprised me, as I assumed that the code was safe enough.
In thi...
Orsa asked 10/1, 2019 at 1:39
13
Solved
In C++,
Why is a boolean 1 byte and not 1 bit of size?
Why aren't there types like a 4-bit or 2-bit integers?
I'm missing out the above things when writing an emulator for a CPU
Montpelier asked 7/1, 2011 at 15:2
1
Solved
The current (Linux) version of the SysV i386 ABI requires 16-byte stack alignment before a call:
The end of the input argument area shall be aligned on a 16 (32, if __m256 is passed on stack) byte...
8
I'm listening to events of my deployed contract. Whenever a transaction gets completed and event is fired receiving the response causes following error:
Uncaught Error: Returned values aren't va...
9
Solved
From a discussion somewhere else:
C++ has no standard ABI (Application Binary Interface)
But neither does C, right?
On any given platform it pretty much does. It wouldn't be useful as the lingua f...
0
64 bit architecture like x86-64 have word size of 64bits. In this case, if a memory access crosses over the word boundary, then it will require double the time to access data. So alignment is requi...
Ashby asked 10/7, 2021 at 6:2
2
Solved
The common explanation for not fixing some issues with C++ is that it would break the ABI and require recompilation, but on the other hand I encounter statements like this:
Honestly, this is true ...
2
It is said that returning an oversized struct by value (as opposed to returning a pointer to the struct) from a function incurs unnecessary copy on the stack. By "oversized", I mean a str...
Cartilaginous asked 3/6, 2021 at 15:55
1 Next >
© 2022 - 2024 — McMap. All rights reserved.