Skip to content

Commit e8b5931

Browse files
committed
Adjust the position of AsmCore members
1 parent 17c0633 commit e8b5931

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

definitions/src/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ pub struct AsmCoreMachine {
105105

106106
pub cfi: u8,
107107
pub elp: u32,
108-
pub shadow_stack: [u8; DEFAULT_SHADOW_STACK_SIZE],
109108
pub ssp: u64,
109+
pub shadow_stack: [u8; DEFAULT_SHADOW_STACK_SIZE],
110110
}
111111

112112
impl Drop for AsmCoreMachine {

definitions/src/generate_asm_constants.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ fn main() {
227227
"#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_ELP {}",
228228
(&m.elp as *const u32 as usize) - m_address
229229
);
230-
println!(
231-
"#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK {}",
232-
(&m.shadow_stack as *const [u8; DEFAULT_SHADOW_STACK_SIZE] as usize) - m_address
233-
);
234230
println!(
235231
"#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SSP {}",
236232
(&m.ssp as *const u64 as usize) - m_address
237233
);
234+
println!(
235+
"#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK {}",
236+
(&m.shadow_stack as *const [u8; DEFAULT_SHADOW_STACK_SIZE] as usize) - m_address
237+
);
238238
println!();
239239

240240
for op in MINIMAL_OPCODE..MAXIMUM_OPCODE {

src/machine/asm/cdefinitions_generated.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_FRAMES_PTR 384
6060
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_CFI 392
6161
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_ELP 396
62-
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK 400
63-
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SSP 65936
62+
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SSP 400
63+
#define CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK 408
6464

6565
#define CKB_VM_ASM_OP_UNLOADED 16
6666
#define CKB_VM_ASM_OP_ADD 17

0 commit comments

Comments
 (0)