// Plan 9 assembly - Dhaedalida RabbitStart / RabbitEnd markers (windows/386).
//
// A separate file from dhaemarker_amd64.s rather than a build-tagged arm because
// Go selects assembly by FILENAME SUFFIX: the toolchain picks this file when
// GOARCH=386 and the amd64 one otherwise, with no tag, no flag and no edit.
// dhaemarker.go (the two func declarations) is arch-neutral and unchanged.
//
// 32-bit x86 has no 64-bit immediate, so the magic cannot be hidden inside a
// `mov reg, imm64` the way the amd64 binding does. It is emitted as inline DATA
// and jumped over:
//
//     EB 08                       jmp short $+10   -> the RET below
//     01 54 76 DE C0 E5 1A D1     DHAE_SIG_RABBITSTART, little-endian
//
// The magic bytes MUST equal DHAE_SIG_RABBITSTART / DHAE_SIG_RABBITEND in
// sdk/dhae_marker_sig.h. NOSPLIT|NOFRAME keeps each marker a tiny leaf with no
// inserted stack-growth prologue, so the magic sits at offset 2 - well within
// the scanner's 16-byte window. RET is left as the Plan 9 pseudo-instruction so
// the assembler picks the encoding; the EB 08 branch lands on it.
//
// Build: GOOS=windows GOARCH=386 go build .
#include "textflag.h"

// func RabbitStart()
TEXT ·RabbitStart(SB), NOSPLIT|NOFRAME, $0-0
	BYTE $0xEB; BYTE $0x08                            // jmp short $+10
	BYTE $0x01; BYTE $0x54; BYTE $0x76; BYTE $0xDE    //   0xD11AE5C0DE765401
	BYTE $0xC0; BYTE $0xE5; BYTE $0x1A; BYTE $0xD1
	RET

// func RabbitEnd()
TEXT ·RabbitEnd(SB), NOSPLIT|NOFRAME, $0-0
	BYTE $0xEB; BYTE $0x08                            // jmp short $+10
	BYTE $0x02; BYTE $0x54; BYTE $0x76; BYTE $0xDE    //   0xD11AE5C0DE765402
	BYTE $0xC0; BYTE $0xE5; BYTE $0x1A; BYTE $0xD1
	RET

// func BearStart()
TEXT ·BearStart(SB), NOSPLIT|NOFRAME, $0-0
	BYTE $0xEB; BYTE $0x08                            // jmp short $+10
	BYTE $0x05; BYTE $0x54; BYTE $0x76; BYTE $0xDE    //   0xD11AE5C0DE765405
	BYTE $0xC0; BYTE $0xE5; BYTE $0x1A; BYTE $0xD1
	RET

// func BearEnd()
TEXT ·BearEnd(SB), NOSPLIT|NOFRAME, $0-0
	BYTE $0xEB; BYTE $0x08                            // jmp short $+10
	BYTE $0x06; BYTE $0x54; BYTE $0x76; BYTE $0xDE    //   0xD11AE5C0DE765406
	BYTE $0xC0; BYTE $0xE5; BYTE $0x1A; BYTE $0xD1
	RET
