2026-09-19 19:17:07 +02:00
|
|
|
// Copyright (c) 2026 Petr Balvín <opensource@petrbalvin.org> (https://petrbalvin.org)
|
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
|
|
// Indirect control flow: JMP/CALL through a register or memory, byte-compared
|
|
|
|
|
// against go tool asm. A CALL in the body also exercises the toolchain's
|
|
|
|
|
// forced base-pointer frame on a frameless function.
|
|
|
|
|
|
|
|
|
|
#include "textflag.h"
|
|
|
|
|
|
|
|
|
|
// func f()
|
|
|
|
|
TEXT ·f(SB), NOSPLIT, $0
|
2026-09-19 23:49:27 +02:00
|
|
|
JMP AX
|
2026-09-19 19:17:07 +02:00
|
|
|
CALL AX
|
2026-09-19 23:49:27 +02:00
|
|
|
JMP (BX)
|
2026-09-19 19:17:07 +02:00
|
|
|
CALL (BX)
|
2026-09-19 23:49:27 +02:00
|
|
|
JMP 8(BX)
|
|
|
|
|
JMP R8
|
2026-09-19 19:17:07 +02:00
|
|
|
RET
|