Skip to content

Commit

Permalink
feat: Golang doesn't allow Call+offset since Go 1.20, thus we must …
Browse files Browse the repository at this point in the history
…use Call and more hacks... (#585)
  • Loading branch information
AsterDY authored and liuq19 committed May 14, 2024
1 parent 0e0878c commit f33e2fc
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 51 deletions.
7 changes: 4 additions & 3 deletions internal/native/neon/f32toa_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__f32toa_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _f32toa
// .p2align 2, 0x00
_f32toa:
WORD $0xa9be7bfd // stp fp, lr, [sp, #-32]!
Expand Down Expand Up @@ -904,7 +905,7 @@ _Digits:
WORD $0x37393639 // .ascii 4, '96979899'
WORD $0x39393839 // .ascii 4, '9899'
WORD $0x00000000 // .p2align 3, 0x00
_LB_b84e6c90: // _pow10_ceil_sig_f32.g
_LB_e80ea3d0: // _pow10_ceil_sig_f32.g
WORD $0x4b43fcf5; WORD $0x81ceb32c // .quad -9093133594791772939
WORD $0x5e14fc32; WORD $0xa2425ff7 // .quad -6754730975062328270
WORD $0x359a3b3f; WORD $0xcad2f7f5 // .quad -3831727700400522433
Expand Down Expand Up @@ -996,7 +997,7 @@ _f32toa:
MOVD out+0(FP), R0
FMOVD val+8(FP), F0
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__f32toa_entry__+16(SB) // _f32toa
CALL ·__f32toa_entry__(SB) // _f32toa
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+16(FP)
RET
Expand Down
7 changes: 4 additions & 3 deletions internal/native/neon/f64toa_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__f64toa_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _f64toa
// .p2align 2, 0x00
_f64toa:
WORD $0xa9be7bfd // stp fp, lr, [sp, #-32]!
Expand Down Expand Up @@ -1220,7 +1221,7 @@ _Digits:
WORD $0x37393639 // .ascii 4, '96979899'
WORD $0x39393839 // .ascii 4, '9899'
// .p2align 3, 0x00
_LB_de8c9345: // _pow10_ceil_sig.g
_LB_40c6cc40: // _pow10_ceil_sig.g
WORD $0xbebcdc4f; WORD $0xff77b1fc // .quad -38366372719436721
WORD $0x13bb0f7b; WORD $0x25e8e89c // .quad 2731688931043774331
WORD $0xf73609b1; WORD $0x9faacf3d // .quad -6941508010590729807
Expand Down Expand Up @@ -2469,7 +2470,7 @@ _f64toa:
MOVD out+0(FP), R0
FMOVD val+8(FP), F0
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__f64toa_entry__+16(SB) // _f64toa
CALL ·__f64toa_entry__(SB) // _f64toa
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+16(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/get_by_path_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__get_by_path_entry__(SB), NOSPLIT, $192
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910343ff // add sp, sp, #208
JMP _get_by_path
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -4566,7 +4567,7 @@ _get_by_path:
MOVD path+16(FP), R2
MOVD m+24(FP), R3
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__get_by_path_entry__+64(SB) // _get_by_path
CALL ·__get_by_path_entry__(SB) // _get_by_path
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+32(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/html_escape_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__html_escape_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _html_escape
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -1389,7 +1390,7 @@ _html_escape:
MOVD dp+16(FP), R2
MOVD dn+24(FP), R3
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__html_escape_entry__+48(SB) // _html_escape
CALL ·__html_escape_entry__(SB) // _html_escape
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+32(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/i64toa_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__i64toa_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _i64toa
// .p2align 3, 0x00
lCPI0_0:
WORD $0x147b20c5
Expand Down Expand Up @@ -963,7 +964,7 @@ _i64toa:
MOVD out+0(FP), R0
MOVD val+8(FP), R1
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__i64toa_entry__+64(SB) // _i64toa
CALL ·__i64toa_entry__(SB) // _i64toa
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+16(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/lspace_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__lspace_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _lspace
// .p2align 2, 0x00
_lspace:
WORD $0xa9be7bfd // stp fp, lr, [sp, #-32]!
Expand Down Expand Up @@ -53,7 +54,7 @@ _lspace:
MOVD nb+8(FP), R1
MOVD off+16(FP), R2
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__lspace_entry__+16(SB) // _lspace
CALL ·__lspace_entry__(SB) // _lspace
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+24(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/quote_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__quote_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _quote
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -2545,7 +2546,7 @@ _quote:
MOVD dn+24(FP), R3
MOVD flags+32(FP), R4
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__quote_entry__+48(SB) // _quote
CALL ·__quote_entry__(SB) // _quote
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+40(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/skip_array_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__skip_array_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _skip_array
// .p2align 4, 0x00
lCPI0_0:
WORD $0x00000001; WORD $0x00000000 // .quad 1
Expand Down Expand Up @@ -2369,7 +2370,7 @@ _skip_array:
MOVD m+16(FP), R2
MOVD flags+24(FP), R3
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__skip_array_entry__+64(SB) // _skip_array
CALL ·__skip_array_entry__(SB) // _skip_array
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+32(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/skip_number_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__skip_number_entry__(SB), NOSPLIT, $32
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9100c3ff // add sp, sp, #48
JMP _skip_number
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -360,7 +361,7 @@ _skip_number:
MOVD s+0(FP), R0
MOVD p+8(FP), R1
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__skip_number_entry__+48(SB) // _skip_number
CALL ·__skip_number_entry__(SB) // _skip_number
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+16(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/skip_object_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__skip_object_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _skip_object
// .p2align 4, 0x00
lCPI0_0:
WORD $0x00000001; WORD $0x00000000 // .quad 1
Expand Down Expand Up @@ -2369,7 +2370,7 @@ _skip_object:
MOVD m+16(FP), R2
MOVD flags+24(FP), R3
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__skip_object_entry__+64(SB) // _skip_object
CALL ·__skip_object_entry__(SB) // _skip_object
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+32(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/skip_one_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__skip_one_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _skip_one
// .p2align 4, 0x00
lCPI0_0:
WORD $0x00000001; WORD $0x00000000 // .quad 1
Expand Down Expand Up @@ -2369,7 +2370,7 @@ _skip_one:
MOVD m+16(FP), R2
MOVD flags+24(FP), R3
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__skip_one_entry__+64(SB) // _skip_one
CALL ·__skip_one_entry__(SB) // _skip_one
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+32(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/skip_one_fast_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__skip_one_fast_entry__(SB), NOSPLIT, $176
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910303ff // add sp, sp, #192
JMP _skip_one_fast
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -985,7 +986,7 @@ _skip_one_fast:
MOVD s+0(FP), R0
MOVD p+8(FP), R1
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__skip_one_fast_entry__+48(SB) // _skip_one_fast
CALL ·__skip_one_fast_entry__(SB) // _skip_one_fast
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+16(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/u64toa_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__u64toa_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _u64toa
// .p2align 3, 0x00
lCPI0_0:
WORD $0x147b20c5
Expand Down Expand Up @@ -580,7 +581,7 @@ _u64toa:
MOVD out+0(FP), R0
MOVD val+8(FP), R1
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__u64toa_entry__+64(SB) // _u64toa
CALL ·__u64toa_entry__(SB) // _u64toa
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+16(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/unquote_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__unquote_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _unquote
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -600,7 +601,7 @@ _unquote:
MOVD ep+24(FP), R3
MOVD flags+32(FP), R4
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__unquote_entry__+48(SB) // _unquote
CALL ·__unquote_entry__(SB) // _unquote
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+40(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/validate_one_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__validate_one_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _validate_one
// .p2align 4, 0x00
lCPI0_0:
WORD $0x00000001; WORD $0x00000000 // .quad 1
Expand Down Expand Up @@ -1845,7 +1846,7 @@ _validate_one:
MOVD p+8(FP), R1
MOVD m+16(FP), R2
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__validate_one_entry__+64(SB) // _validate_one
CALL ·__validate_one_entry__(SB) // _validate_one
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+24(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/validate_utf8_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__validate_utf8_entry__(SB), NOSPLIT, $48
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910103ff // add sp, sp, #64
JMP _validate_utf8
// .p2align 2, 0x00
_validate_utf8:
WORD $0xd10103ff // sub sp, sp, #64
Expand Down Expand Up @@ -209,7 +210,7 @@ _validate_utf8:
MOVD p+8(FP), R1
MOVD m+16(FP), R2
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__validate_utf8_entry__+16(SB) // _validate_utf8
CALL ·__validate_utf8_entry__(SB) // _validate_utf8
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+24(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/validate_utf8_fast_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__validate_utf8_fast_entry__(SB), NOSPLIT, $32
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9100c3ff // add sp, sp, #48
JMP _validate_utf8_fast
// .p2align 2, 0x00
_validate_utf8_fast:
WORD $0xd100c3ff // sub sp, sp, #48
Expand Down Expand Up @@ -169,7 +170,7 @@ _entry:
_validate_utf8_fast:
MOVD s+0(FP), R0
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__validate_utf8_fast_entry__+16(SB) // _validate_utf8_fast
CALL ·__validate_utf8_fast_entry__(SB) // _validate_utf8_fast
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+8(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/value_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__value_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _value
// .p2align 4, 0x00
lCPI0_0:
WORD $0x08040201
Expand Down Expand Up @@ -5953,7 +5954,7 @@ _value:
MOVD v+24(FP), R3
MOVD flags+32(FP), R4
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__value_entry__+48(SB) // _value
CALL ·__value_entry__(SB) // _value
WORD $0xf94007fc // ldr x28, [sp, #8]
MOVD R0, ret+40(FP)
RET
Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/vnumber_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__vnumber_entry__(SB), NOSPLIT, $96
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x9101c3ff // add sp, sp, #112
JMP _vnumber
// .p2align 2, 0x00
_vnumber:
WORD $0xa9b96ffc // stp x28, x27, [sp, #-112]!
Expand Down Expand Up @@ -4676,7 +4677,7 @@ _vnumber:
MOVD p+8(FP), R1
MOVD v+16(FP), R2
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__vnumber_entry__+16(SB) // _vnumber
CALL ·__vnumber_entry__(SB) // _vnumber
WORD $0xf94007fc // ldr x28, [sp, #8]
RET

Expand Down
5 changes: 3 additions & 2 deletions internal/native/neon/vsigned_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEXT ·__vsigned_entry__(SB), NOSPLIT, $16
NO_LOCAL_POINTERS
PCALIGN $16
WORD $0x910083ff // add sp, sp, #32
JMP _vsigned
// .p2align 2, 0x00
_vsigned:
WORD $0xa9be7bfd // stp fp, lr, [sp, #-32]!
Expand Down Expand Up @@ -137,7 +138,7 @@ _vsigned:
MOVD p+8(FP), R1
MOVD v+16(FP), R2
WORD $0xf90007fc // str x28, [sp, #8]
CALL ·__vsigned_entry__+16(SB) // _vsigned
CALL ·__vsigned_entry__(SB) // _vsigned
WORD $0xf94007fc // ldr x28, [sp, #8]
RET

Expand Down
Loading

0 comments on commit f33e2fc

Please sign in to comment.