Folkert
8414e18ffb
attach 12-bit relocation to the addition instruction
2023-10-09 15:24:35 +02:00
Folkert
e1f173fb95
fix missing data ptr relocation for aarch64
2023-10-09 15:24:35 +02:00
Folkert
82b96395e2
fix argument passing for systemv
2023-10-09 15:24:35 +02:00
Folkert
42d324299d
fix bug in copying small bits of data (e.g. 3 bytes)
2023-10-09 15:24:34 +02:00
Folkert
66db1ce206
clippy fixes
2023-10-09 15:24:34 +02:00
Agus Zubiaga
27aab8b69a
Use X15 instead of requesting general reg
2023-10-09 15:24:34 +02:00
Agus Zubiaga
1021423e69
Use reg from StorageManager instead of XR while loading args
...
When a function returns via arg pointer, the caller sets XR (x8) to
the address where the return value goes. We were sometimes using XR
as a temporary register while loading args, which lead to a segfault
when returning.
It will now request a general available register from StorageManager
instead.
2023-10-09 15:24:33 +02:00
Folkert
905dc8cd59
pass small non-recursive tag unions via registers (like records)
2023-10-09 15:24:33 +02:00
Folkert
5f9008fbcc
on x86 (systemv, haven't checked windows) pass small structs via registers
2023-10-09 15:24:32 +02:00
Folkert
b410ae5642
fix arithmetic error in copy function
2023-10-09 15:24:31 +02:00
Folkert
6442dc2a94
use the proper temporary register
2023-10-09 15:24:31 +02:00
Folkert
9bf5bd4d39
128-bit structs, properly
2023-10-09 15:24:31 +02:00
Folkert
3a8d4b853b
an attempt at passing bigger values
2023-10-09 15:24:30 +02:00
Folkert
529703d449
fix data pointers
2023-10-09 15:24:30 +02:00
Folkert
ce34d5826b
on aarch64, unify data and function pointers
2023-10-09 15:24:30 +02:00
Folkert
311ae4c7a6
an attempt at function pointers
2023-10-09 15:24:29 +02:00
Folkert
889e2f5026
remove overflow / adds / smulh logic
...
we do all overflow operations in zig
2023-09-17 18:03:36 +02:00
Folkert
dc179a1aa6
simplify moving with the scratch register we now have
2023-09-17 18:01:08 +02:00
Folkert
dd12069013
ranges
2023-09-17 17:51:02 +02:00
Folkert
e4ddc39b63
another logical error
2023-09-17 17:45:32 +02:00
Folkert
a990fab16f
fix some bitshifts
2023-09-17 17:40:29 +02:00
Folkert
1a49076a30
bigger jumps with an extra register
2023-09-17 17:36:08 +02:00
Folkert
a4df2cebfb
maybe do bigger negative loads/stores?
2023-09-17 16:44:05 +02:00
Folkert
dd732736e0
clippy
2023-09-17 16:26:39 +02:00
Folkert
fca3c50240
irem/urem
2023-09-17 16:11:47 +02:00
Folkert
e0071e3265
do checked arithmetic using zig...
2023-09-17 15:48:15 +02:00
Folkert
c6593725df
improved implementation of checked arithmetic
2023-09-17 15:43:11 +02:00
Folkert
54732b5750
don't emit fmov xi, xi
2023-09-17 13:50:03 +02:00
Folkert
be9cfa7e4e
float str -> stur
2023-09-17 13:48:47 +02:00
Folkert
15d7775652
get shadow space right
2023-09-17 13:38:11 +02:00
Folkert
857c48c933
fix off by 16
2023-09-17 13:29:35 +02:00
Folkert
0f77a24a2d
simplify addition with negative imm
2023-09-16 20:22:32 +02:00
Folkert
29daf4dd5e
fix returning big structures
2023-09-16 19:31:47 +02:00
Folkert
b440c30731
mov float to general
2023-09-16 18:23:04 +02:00
Folkert
dc967f515e
32-bit float mov
2023-09-16 18:16:32 +02:00
Folkert
f22318e54e
move general to float
2023-09-16 18:03:59 +02:00
Folkert
8ceb705212
move big float from general to float register
2023-09-16 17:30:58 +02:00
Folkert
7f8ff25cd3
copy bigger things to the stack
2023-09-16 16:40:12 +02:00
Folkert
09d4553019
move floats from memory
2023-09-16 16:35:28 +02:00
Folkert
344b8ca29f
allow providing dec arguments
2023-09-16 16:28:47 +02:00
Folkert
0d665a89b0
give the free float registers
2023-09-16 16:28:36 +02:00
Folkert
91bd3abfaf
use ldur for float values too
2023-09-16 16:16:25 +02:00
Folkert
12584abdb7
set if overflow
2023-09-16 16:14:10 +02:00
Folkert
a8c8834a3c
actually understand this jmp address bug
2023-09-16 15:57:03 +02:00
Folkert
99873f948d
move jmp into the architecture-specific trait mods
2023-09-16 15:32:38 +02:00
Folkert
93d7054a00
refactor how we do jumps
2023-09-16 15:24:43 +02:00
Folkert
3e19f4a6fb
document how jumps are generated
2023-09-16 15:06:54 +02:00
Folkert
d4cc3a63f5
use stur instead of str
2023-09-16 13:18:40 +02:00
Folkert
63626fe808
move fp <- sp later
2023-09-16 12:31:37 +02:00
Folkert
8021f3809c
cheaty way of setting the frame pointer
2023-09-16 12:20:50 +02:00