mirror of
https://github.com/corda/corda.git
synced 2025-02-27 11:36:42 +00:00
handle 32-bit immediate values in Assembler.push()
This commit is contained in:
parent
ccd7118bed
commit
f2ec75e202
@ -97,7 +97,11 @@ class Buffer {
|
|||||||
void appendAddress(uintptr_t v) {
|
void appendAddress(uintptr_t v) {
|
||||||
append4(v);
|
append4(v);
|
||||||
if (BytesPerWord == 8) {
|
if (BytesPerWord == 8) {
|
||||||
|
// we have to use the preprocessor here to avoid a warning on
|
||||||
|
// 32-bit systems
|
||||||
|
#ifdef __x86_64__
|
||||||
append4(v >> 32);
|
append4(v >> 32);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,10 +308,13 @@ class Assembler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void push(int32_t v) {
|
void push(int32_t v) {
|
||||||
assert(code.s, isByte(v)); // todo
|
if (isByte(v)) {
|
||||||
|
|
||||||
code.append(0x6a);
|
code.append(0x6a);
|
||||||
code.append(v);
|
code.append(v);
|
||||||
|
} else {
|
||||||
|
code.append(0x68);
|
||||||
|
code.append4(v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void pushAddress(uintptr_t v) {
|
void pushAddress(uintptr_t v) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user