Skip to content

Commit

Permalink
Update assembly tests to current nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Aug 27, 2023
1 parent 77c4030 commit 2b706ee
Show file tree
Hide file tree
Showing 24 changed files with 265 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ l_anon.[ID].3:
.p2align 3, 0x0
l_anon.[ID].4:
.quad l_anon.[ID].3
.asciz "t\000\000\000\000\000\000\000\225\000\000\0002\000\000"
.asciz "p\000\000\000\000\000\000\000\225\000\000\0002\000\000"

.section __TEXT,__literal4,4byte_literals
l_anon.[ID].5:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ l_anon.[ID].3:
.p2align 2, 0x0
l_anon.[ID].4:
.long l_anon.[ID].3
.asciz "t\000\000\000\225\000\000\0002\000\000"
.asciz "p\000\000\000\225\000\000\0002\000\000"

.section __TEXT,__literal4,4byte_literals
L_anon.[ID].5:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ l_anon.[ID].3:
.p2align 2, 0x0
l_anon.[ID].4:
.long l_anon.[ID].3
.asciz "t\000\000\000\225\000\000\0002\000\000"
.asciz "p\000\000\000\225\000\000\0002\000\000"

.section __TEXT,__literal4,4byte_literals
L_anon.[ID].5:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ L1$pb:
add esp, 16
test eax, eax
je LBB1_4
mov dword ptr [ebp - 40], eax
mov dword ptr [ebp - 36], eax
sub esp, 8
lea eax, [esi + l_anon.[ID].6-L1$pb]
lea ecx, [esi + L_anon.[ID].5-L1$pb]
lea ebx, [ebp - 40]
lea ebx, [ebp - 36]
push eax
push 0
push 1
Expand Down Expand Up @@ -152,7 +152,7 @@ L1$pb:
push eax
call SYM(objc2::declare::ClassBuilder::add_method_inner::GENERATED_ID, 0)
add esp, 20
push dword ptr [ebp - 40]
push dword ptr [ebp - 36]
call SYM(objc2::declare::ClassBuilder::register::GENERATED_ID, 0)
add esp, 60
pop esi
Expand All @@ -170,19 +170,19 @@ LBB1_3:
call SYM(core::panicking::panic::GENERATED_ID, 0)
LBB1_4:
lea eax, [esi + l_anon.[ID].21-L1$pb]
mov dword ptr [ebp - 48], eax
lea eax, [esi + SYM(<&str as core[CRATE_ID]::fmt::Display>::fmt, 0)-L1$pb]
mov dword ptr [ebp - 44], eax
lea eax, [esi + l_anon.[ID].20-L1$pb]
lea eax, [esi + SYM(<&str as core[CRATE_ID]::fmt::Display>::fmt, 0)-L1$pb]
mov dword ptr [ebp - 40], eax
mov dword ptr [ebp - 36], 2
mov dword ptr [ebp - 24], 0
lea eax, [ebp - 48]
mov dword ptr [ebp - 32], eax
mov dword ptr [ebp - 28], 1
lea eax, [esi + l_anon.[ID].20-L1$pb]
mov dword ptr [ebp - 36], eax
mov dword ptr [ebp - 32], 2
mov dword ptr [ebp - 20], 0
lea eax, [ebp - 44]
mov dword ptr [ebp - 28], eax
mov dword ptr [ebp - 24], 1
sub esp, 8
lea eax, [esi + l_anon.[ID].10-L1$pb]
lea ecx, [ebp - 40]
lea ecx, [ebp - 36]
push eax
push ecx
call SYM(core::panicking::panic_fmt::GENERATED_ID, 0)
Expand Down Expand Up @@ -435,10 +435,10 @@ L8$pb:
LBB8_2:
mov eax, dword ptr [ebx + LL_OBJC_CLASS_REFERENCES_NSObject$non_lazy_ptr-L8$pb]
mov eax, dword ptr [eax]
mov dword ptr [ebp - 24], edi
mov dword ptr [ebp - 20], eax
mov dword ptr [ebp - 20], edi
mov dword ptr [ebp - 16], eax
sub esp, 8
lea eax, [ebp - 24]
lea eax, [ebp - 20]
push esi
push eax
call _objc_msgSendSuper
Expand Down Expand Up @@ -742,7 +742,7 @@ l_anon.[ID].3:
.p2align 2, 0x0
l_anon.[ID].4:
.long l_anon.[ID].3
.asciz "t\000\000\000\225\000\000\0002\000\000"
.asciz "p\000\000\000\225\000\000\0002\000\000"

.section __TEXT,__literal4,4byte_literals
L_anon.[ID].5:
Expand Down
32 changes: 16 additions & 16 deletions crates/test-assembly/crates/test_declare_class/expected/apple-x86.s
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ L1$pb:
add esp, 16
test eax, eax
je LBB1_4
mov dword ptr [ebp - 40], eax
mov dword ptr [ebp - 36], eax
sub esp, 8
lea eax, [esi + l_anon.[ID].6-L1$pb]
lea ecx, [esi + L_anon.[ID].5-L1$pb]
lea ebx, [ebp - 40]
lea ebx, [ebp - 36]
push eax
push 0
push 1
Expand Down Expand Up @@ -152,7 +152,7 @@ L1$pb:
push eax
call SYM(objc2::declare::ClassBuilder::add_method_inner::GENERATED_ID, 0)
add esp, 20
push dword ptr [ebp - 40]
push dword ptr [ebp - 36]
call SYM(objc2::declare::ClassBuilder::register::GENERATED_ID, 0)
add esp, 60
pop esi
Expand All @@ -170,19 +170,19 @@ LBB1_3:
call SYM(core::panicking::panic::GENERATED_ID, 0)
LBB1_4:
lea eax, [esi + l_anon.[ID].21-L1$pb]
mov dword ptr [ebp - 48], eax
lea eax, [esi + SYM(<&str as core[CRATE_ID]::fmt::Display>::fmt, 0)-L1$pb]
mov dword ptr [ebp - 44], eax
lea eax, [esi + l_anon.[ID].20-L1$pb]
lea eax, [esi + SYM(<&str as core[CRATE_ID]::fmt::Display>::fmt, 0)-L1$pb]
mov dword ptr [ebp - 40], eax
mov dword ptr [ebp - 36], 2
mov dword ptr [ebp - 24], 0
lea eax, [ebp - 48]
mov dword ptr [ebp - 32], eax
mov dword ptr [ebp - 28], 1
lea eax, [esi + l_anon.[ID].20-L1$pb]
mov dword ptr [ebp - 36], eax
mov dword ptr [ebp - 32], 2
mov dword ptr [ebp - 20], 0
lea eax, [ebp - 44]
mov dword ptr [ebp - 28], eax
mov dword ptr [ebp - 24], 1
sub esp, 8
lea eax, [esi + l_anon.[ID].10-L1$pb]
lea ecx, [ebp - 40]
lea ecx, [ebp - 36]
push eax
push ecx
call SYM(core::panicking::panic_fmt::GENERATED_ID, 0)
Expand Down Expand Up @@ -435,10 +435,10 @@ L8$pb:
LBB8_2:
mov eax, dword ptr [ebx + LL_OBJC_CLASSLIST_REFERENCES_$_NSObject$non_lazy_ptr-L8$pb]
mov eax, dword ptr [eax]
mov dword ptr [ebp - 24], edi
mov dword ptr [ebp - 20], eax
mov dword ptr [ebp - 20], edi
mov dword ptr [ebp - 16], eax
sub esp, 8
lea eax, [ebp - 24]
lea eax, [ebp - 20]
push esi
push eax
call _objc_msgSendSuper
Expand Down Expand Up @@ -742,7 +742,7 @@ l_anon.[ID].3:
.p2align 2, 0x0
l_anon.[ID].4:
.long l_anon.[ID].3
.asciz "t\000\000\000\225\000\000\0002\000\000"
.asciz "p\000\000\000\225\000\000\0002\000\000"

.section __TEXT,__literal4,4byte_literals
L_anon.[ID].5:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ l_anon.[ID].3:
.p2align 3, 0x0
l_anon.[ID].4:
.quad l_anon.[ID].3
.asciz "L\000\000\000\000\000\000\000\225\000\000\0002\000\000"
.asciz "p\000\000\000\000\000\000\000\225\000\000\0002\000\000"

.section __TEXT,__literal4,4byte_literals
L_anon.[ID].5:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,12 @@ Lloh81:
.globl _use_in_loop
.p2align 2
_use_in_loop:
cbz x0, LBB6_6
stp x24, x23, [sp, #-64]!
stp x22, x21, [sp, #16]
stp x20, x19, [sp, #32]
stp x29, x30, [sp, #48]
add x29, sp, #48
cbz x0, LBB6_5
mov x19, x0
adrp x23, SYM(test_dynamic_class[CRATE_ID]::use_in_loop::CACHED_CLASS, 0)@PAGE
Lloh82:
Expand Down Expand Up @@ -350,6 +350,7 @@ LBB6_5:
ldp x20, x19, [sp, #32]
ldp x22, x21, [sp, #16]
ldp x24, x23, [sp], #64
LBB6_6:
ret
.loh AdrpAdd Lloh86, Lloh87
.loh AdrpAdd Lloh84, Lloh85
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,12 @@ LPC5_6:
.p2align 2
.code 32
_use_in_loop:
cmp r0, #0
bxeq lr
LBB6_1:
push {r4, r5, r6, r7, lr}
add r7, sp, #12
push {r8}
cmp r0, #0
beq LBB6_5
movw r5, :lower16:(SYM(test_dynamic_class[CRATE_ID]::use_in_loop::CACHED_CLASS, 0)-(LPC6_0+8))
mov r4, r0
movt r5, :upper16:(SYM(test_dynamic_class[CRATE_ID]::use_in_loop::CACHED_CLASS, 0)-(LPC6_0+8))
Expand Down Expand Up @@ -288,7 +289,8 @@ LBB6_3:
b LBB6_2
LBB6_5:
pop {r8}
pop {r4, r5, r6, r7, pc}
pop {r4, r5, r6, r7, lr}
bx lr

.section __TEXT,__const
l_anon.[ID].0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
.p2align 2
.code 32
_get_class:
push {r7, lr}
mov r7, sp
movw r0, :lower16:(__MergedGlobals-(LPC0_0+8))
movt r0, :upper16:(__MergedGlobals-(LPC0_0+8))
LPC0_0:
add r0, pc, r0
ldr r0, [r0]
cmp r0, #0
popne {r7, pc}
bxne lr
LBB0_1:
push {r7, lr}
mov r7, sp
movw r0, :lower16:(__MergedGlobals-(LPC0_1+8))
movt r0, :upper16:(__MergedGlobals-(LPC0_1+8))
movw r1, :lower16:(l_anon.[ID].0-(LPC0_2+8))
Expand All @@ -27,22 +27,23 @@ LPC0_2:
LPC0_3:
add r2, pc, r2
bl SYM(objc2::__macro_helpers::cache::CachedClass::fetch::GENERATED_ID, 0)
pop {r7, pc}
pop {r7, lr}
bx lr

.globl _get_same_class
.p2align 2
.code 32
_get_same_class:
push {r7, lr}
mov r7, sp
movw r3, :lower16:(__MergedGlobals-(LPC1_0+8))
movt r3, :upper16:(__MergedGlobals-(LPC1_0+8))
LPC1_0:
add r3, pc, r3
ldr r0, [r3, #4]
cmp r0, #0
popne {r7, pc}
bxne lr
LBB1_1:
push {r7, lr}
mov r7, sp
movw r1, :lower16:(l_anon.[ID].0-(LPC1_1+8))
add r0, r3, #4
movt r1, :upper16:(l_anon.[ID].0-(LPC1_1+8))
Expand All @@ -53,22 +54,23 @@ LPC1_1:
LPC1_2:
add r2, pc, r2
bl SYM(objc2::__macro_helpers::cache::CachedClass::fetch::GENERATED_ID, 0)
pop {r7, pc}
pop {r7, lr}
bx lr

.globl _get_different_class
.p2align 2
.code 32
_get_different_class:
push {r7, lr}
mov r7, sp
movw r3, :lower16:(__MergedGlobals-(LPC2_0+8))
movt r3, :upper16:(__MergedGlobals-(LPC2_0+8))
LPC2_0:
add r3, pc, r3
ldr r0, [r3, #8]
cmp r0, #0
popne {r7, pc}
bxne lr
LBB2_1:
push {r7, lr}
mov r7, sp
movw r1, :lower16:(l_anon.[ID].4-(LPC2_1+8))
add r0, r3, #8
movt r1, :upper16:(l_anon.[ID].4-(LPC2_1+8))
Expand All @@ -79,22 +81,23 @@ LPC2_1:
LPC2_2:
add r2, pc, r2
bl SYM(objc2::__macro_helpers::cache::CachedClass::fetch::GENERATED_ID, 0)
pop {r7, pc}
pop {r7, lr}
bx lr

.globl _unused_class
.p2align 2
.code 32
_unused_class:
push {r7, lr}
mov r7, sp
movw r0, :lower16:(SYM(test_dynamic_class[CRATE_ID]::unused_class::CACHED_CLASS, 0)-(LPC3_0+8))
movt r0, :upper16:(SYM(test_dynamic_class[CRATE_ID]::unused_class::CACHED_CLASS, 0)-(LPC3_0+8))
LPC3_0:
add r0, pc, r0
ldr r0, [r0]
cmp r0, #0
popne {r7, pc}
bxne lr
LBB3_1:
push {r7, lr}
mov r7, sp
movw r0, :lower16:(SYM(test_dynamic_class[CRATE_ID]::unused_class::CACHED_CLASS, 0)-(LPC3_1+8))
movt r0, :upper16:(SYM(test_dynamic_class[CRATE_ID]::unused_class::CACHED_CLASS, 0)-(LPC3_1+8))
movw r1, :lower16:(l_anon.[ID].6-(LPC3_2+8))
Expand All @@ -108,7 +111,8 @@ LPC3_2:
LPC3_3:
add r2, pc, r2
bl SYM(objc2::__macro_helpers::cache::CachedClass::fetch::GENERATED_ID, 0)
pop {r7, pc}
pop {r7, lr}
bx lr

.globl _use_fns
.p2align 2
Expand Down Expand Up @@ -267,11 +271,12 @@ LPC5_6:
.p2align 2
.code 32
_use_in_loop:
cmp r0, #0
bxeq lr
LBB6_1:
push {r4, r5, r6, r7, lr}
add r7, sp, #12
push {r8}
cmp r0, #0
beq LBB6_5
movw r5, :lower16:(SYM(test_dynamic_class[CRATE_ID]::use_in_loop::CACHED_CLASS, 0)-(LPC6_0+8))
mov r4, r0
movt r5, :upper16:(SYM(test_dynamic_class[CRATE_ID]::use_in_loop::CACHED_CLASS, 0)-(LPC6_0+8))
Expand Down Expand Up @@ -300,7 +305,8 @@ LBB6_3:
b LBB6_2
LBB6_5:
pop {r8}
pop {r4, r5, r6, r7, pc}
pop {r4, r5, r6, r7, lr}
bx lr

.section __TEXT,__const
l_anon.[ID].0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ LBB5_3:
.globl _use_in_loop
.p2align 4, 0x90
_use_in_loop:
test rdi, rdi
je LBB6_6
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
test rdi, rdi
je LBB6_5
mov rbx, rdi
lea r14, [rip + SYM(test_dynamic_class[CRATE_ID]::use_in_loop::CACHED_CLASS, 0)]
lea r15, [rip + l_anon.[ID].10]
Expand All @@ -211,6 +211,7 @@ LBB6_5:
pop r14
pop r15
pop rbp
LBB6_6:
ret

.section __TEXT,__const
Expand Down
Loading

0 comments on commit 2b706ee

Please sign in to comment.