CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
84 lines
1.4 KiB
ArmAsm
84 lines
1.4 KiB
ArmAsm
;;; Test 68HC12 FAR trampoline generation
|
|
;;; 2 trampolines are generated:
|
|
;;; - one for '_far_bar'
|
|
;;; - one for '_far_foo'
|
|
;;; 'far_no_tramp' does not have any trampoline generated.
|
|
;;;
|
|
.sect .text
|
|
.globl _start
|
|
_start:
|
|
start:
|
|
lds #stack-1
|
|
ldx #0xabcd
|
|
pshx
|
|
ldd #0x1234
|
|
ldx #0x5678
|
|
bsr _far_bar ; Call to trampoline generated code
|
|
cpx #0x1234
|
|
bne fail ; X and D preserved (swapped by _far_bar)
|
|
cpd #0x5678
|
|
bne fail
|
|
pulx
|
|
cpx #0xabcd ; Stack parameter preserved
|
|
bne fail
|
|
ldd #_far_foo ; Get address of trampoline handler
|
|
xgdx
|
|
jsr 0,x
|
|
ldd #_far_bar ; Likewise (unique trampoline check)
|
|
xgdy
|
|
jsr 0,y
|
|
call _far_no_tramp ; No trampoline generated for _far_no_tramp
|
|
clra
|
|
clrb
|
|
wai
|
|
fail:
|
|
ldd #1
|
|
wai
|
|
bra start
|
|
|
|
.sect .bank1,"ax"
|
|
.globl _far_bar
|
|
.far _far_bar ; Must mark symbol as far
|
|
_far_bar:
|
|
jsr local_bank1
|
|
xgdx
|
|
rtc
|
|
|
|
local_bank1:
|
|
rts
|
|
|
|
.sect .bank2,"ax"
|
|
.globl _far_foo
|
|
.far _far_foo
|
|
_far_foo:
|
|
jsr local_bank2
|
|
rtc
|
|
|
|
local_bank2:
|
|
rts
|
|
|
|
.sect .bank3,"ax"
|
|
.globl _far_no_tramp
|
|
.far _far_no_tramp
|
|
_far_no_tramp:
|
|
jsr local_bank3
|
|
rtc
|
|
|
|
local_bank3:
|
|
rts
|
|
|
|
.sect .text
|
|
.globl __far_trampoline
|
|
__far_trampoline:
|
|
movb 0,sp, 2,sp ; Copy page register below the caller's return
|
|
leas 2,sp ; address.
|
|
jmp 0,y ; We have a 'call/rtc' stack layout now
|
|
; and can jump to the far handler
|
|
; (whose memory bank is mapped due to the
|
|
; call to the trampoline).
|
|
|
|
.sect .bss
|
|
.skip 100
|
|
stack:
|
|
|