libqbe/test/isel5.ssa
Quentin Carbonneaux 90050202f5 fix various codegen bugs on arm64
- dynamic allocations could generate
  bad 'and' instructions (for the
  and with -16 in salloc()).
- symbols used in w context would
  generate adrp and add instructions
  on wN registers while they seem to
  only work on xN registers.

Thanks to Rosie for reporting them.
2024-10-01 19:42:50 +02:00

16 lines
267 B
Text

# make sure the local symbols used for
# fp constants do not get a _ prefix
# on apple arm hardware
export function w $main() {
@start
%r =d copy d_1.2
%x =w call $printf(l $fmt, ..., d %r)
ret 0
}
data $fmt = { b "%.06f\n", b 0 }
# >>> output
# 1.200000
# <<<