0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-28 00:33:02 +00:00

Use Keep modes for byte and short literals

This commit is contained in:
Devine Lu Linvega 2021-10-29 16:02:07 -07:00
parent 8132a09e21
commit 6f872feff5

View file

@ -112,7 +112,7 @@ findopcode(char *s)
static void static void
pushbyte(Uint8 b, int lit) pushbyte(Uint8 b, int lit)
{ {
if(lit) pushbyte(findopcode("LIT"), 0); if(lit) pushbyte(findopcode("LITk"), 0);
p.data[p.ptr++] = b; p.data[p.ptr++] = b;
p.length = p.ptr; p.length = p.ptr;
} }
@ -120,7 +120,7 @@ pushbyte(Uint8 b, int lit)
static void static void
pushshort(Uint16 s, int lit) pushshort(Uint16 s, int lit)
{ {
if(lit) pushbyte(findopcode("LIT2"), 0); if(lit) pushbyte(findopcode("LIT2k"), 0);
pushbyte((s >> 8) & 0xff, 0); pushbyte((s >> 8) & 0xff, 0);
pushbyte(s & 0xff, 0); pushbyte(s & 0xff, 0);
} }