more code

This commit is contained in:
Perry Kivolowitz 2022-07-21 11:12:41 -05:00
parent 1e325fa7d8
commit 0a4faac56a
2 changed files with 21 additions and 16 deletions

View file

@ -1,16 +0,0 @@
.text
.global main
.align 2
main: str x30, [sp, -16]!
ldr s0, =0x3fc00000
fcvt d0, s0
ldr x0, =fmt
bl printf
ldr x30, [sp], 16
mov w0, wzr
ret
.data
fmt: .asciz "%f\n"
.end

21
section_1/float/test.cpp Normal file
View file

@ -0,0 +1,21 @@
#include <cinttypes>
extern "C" uint32_t T1(double d) {
return uint32_t(d);
}
extern "C" uint32_t T2(float f) {
return uint32_t(f);
}
extern "C" int32_t T3(double d) {
return int32_t(d);
}
extern "C" int32_t T4(float f) {
return int32_t(f);
}
extern "C" uint64_t T5(double d) {
return uint64_t(d);
}