fix(asm): close the oracle parity gaps in frame addressing and calls
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Large frame offsets and tail calls, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·bigframe(SB), $9000-32
|
||||
MOVQ x+0(FP), R8
|
||||
MOVQ y+8(FP), R9
|
||||
MOVQ R8, z+24(FP)
|
||||
MOVQ R9, w+8992(FP)
|
||||
RET
|
||||
|
||||
TEXT ·tail(SB), $0-0
|
||||
JMP ·other(SB)
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Large frame offsets and tail calls, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·bigframe(SB), $9000-32
|
||||
MOVD x+0(FP), R5
|
||||
MOVD y+8(FP), R6
|
||||
MOVD R5, z+24(FP)
|
||||
MOVB R5, b+16(FP)
|
||||
MOVD R5, w+30000(FP)
|
||||
RET
|
||||
|
||||
TEXT ·unaligned(SB), $9000-16
|
||||
MOVD x+4(FP), R5
|
||||
MOVD R5, ret+8(FP)
|
||||
RET
|
||||
|
||||
TEXT ·b32k(SB), $32744-8
|
||||
MOVD x+0(FP), R5
|
||||
MOVD R5, ret+0(FP)
|
||||
RET
|
||||
|
||||
TEXT ·oddframe(SB), $8-8
|
||||
MOVD x+0(FP), R5
|
||||
MOVD R5, ret+0(FP)
|
||||
RET
|
||||
|
||||
TEXT ·tail(SB), $0-0
|
||||
JMP ·other(SB)
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Large frame offsets and tail calls, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·bigframe(SB), $9000-32
|
||||
MOVV x+0(FP), R5
|
||||
MOVB y+8990(FP), R6
|
||||
MOVV R5, z+16(FP)
|
||||
RET
|
||||
|
||||
TEXT ·tail(SB), $0-0
|
||||
JMP ·other(SB)
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Large frame offsets and tail calls, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·bigframe(SB), $9000-32
|
||||
MOV x+0(FP), X5
|
||||
MOV y+8(FP), X6
|
||||
MOV X5, z+24(FP)
|
||||
MOV $77, X7
|
||||
MOV X7, w+8992(FP)
|
||||
RET
|
||||
|
||||
TEXT ·oddsp(SB), $16-8
|
||||
MOV X5, x-9000(SP)
|
||||
MOV X5, ret+0(FP)
|
||||
RET
|
||||
|
||||
TEXT ·tail(SB), $0-0
|
||||
JMP ·other(SB)
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Stack-split guard classes, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·leafsmall(SB), $16-0
|
||||
RET
|
||||
|
||||
TEXT ·leafmed(SB), $256-0
|
||||
RET
|
||||
|
||||
TEXT ·leafbig(SB), $8192-0
|
||||
RET
|
||||
|
||||
TEXT ·callsmall(SB), $16-0
|
||||
CALL ·other(SB)
|
||||
RET
|
||||
|
||||
TEXT ·nosplit(SB), NOSPLIT, $16-0
|
||||
RET
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Stack-split guard classes, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·leafsmall(SB), $16-0
|
||||
RET
|
||||
|
||||
TEXT ·leafmed(SB), $256-0
|
||||
RET
|
||||
|
||||
TEXT ·leafbig(SB), $8192-0
|
||||
RET
|
||||
|
||||
TEXT ·oddframe(SB), $8-8
|
||||
MOVD x+0(FP), R5
|
||||
MOVD R5, ret+0(FP)
|
||||
RET
|
||||
|
||||
TEXT ·callsmall(SB), $16-0
|
||||
CALL ·other(SB)
|
||||
RET
|
||||
|
||||
TEXT ·nosplit(SB), NOSPLIT, $16-0
|
||||
RET
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Stack-split guard classes, byte-parity-checked against go tool asm: every
|
||||
// class plus the materialised-constant and zero-low-bit variants.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·leafsmall(SB), $16-0
|
||||
RET
|
||||
|
||||
TEXT ·leafmed(SB), $256-0
|
||||
RET
|
||||
|
||||
TEXT ·fit2048(SB), $2040-0
|
||||
RET
|
||||
|
||||
TEXT ·med2048off(SB), $2168-0
|
||||
RET
|
||||
|
||||
TEXT ·medmat(SB), $2176-0
|
||||
RET
|
||||
|
||||
TEXT ·leafbig(SB), $8192-0
|
||||
RET
|
||||
|
||||
TEXT ·bigzero(SB), $4088-0
|
||||
RET
|
||||
|
||||
TEXT ·big3976(SB), $4096-0
|
||||
RET
|
||||
|
||||
TEXT ·giantlo0(SB), $4216-0
|
||||
RET
|
||||
|
||||
TEXT ·callbig(SB), $8192-0
|
||||
CALL ·other(SB)
|
||||
RET
|
||||
|
||||
TEXT ·nosplit(SB), NOSPLIT, $16-0
|
||||
RET
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Stack-split guard classes, byte-parity-checked against go tool asm.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT ·leafsmall(SB), $16-0
|
||||
RET
|
||||
|
||||
TEXT ·leafmed(SB), $256-0
|
||||
RET
|
||||
|
||||
TEXT ·leafbig(SB), $8192-0
|
||||
RET
|
||||
|
||||
TEXT ·frameless(SB), $0-0
|
||||
CALL ·other(SB)
|
||||
RET
|
||||
|
||||
TEXT ·nosplit(SB), NOSPLIT, $16-0
|
||||
RET
|
||||
|
||||
TEXT ·other(SB), NOSPLIT, $0
|
||||
RET
|
||||
Reference in New Issue
Block a user