From 435ea9f6989c0b7690b46c0c0b61d0c43e0ba158 Mon Sep 17 00:00:00 2001 From: Ry Date: Tue, 7 Feb 2023 22:26:07 -0800 Subject: [PATCH] rv2fox: *Properly* understand .byte and .half directives --- gcc/rv2fox | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/rv2fox b/gcc/rv2fox index f17e497..cc605e3 100755 --- a/gcc/rv2fox +++ b/gcc/rv2fox @@ -193,12 +193,14 @@ class Converter: pass # ignore elif m := re.fullmatch(r'word\s+([^\s]+)', line): self.e.data(*m.groups()) + elif m := re.fullmatch(r'half\s+([^\s]+)', line): + self.e.data(*m.groups(), size=16) + elif m := re.fullmatch(r'byte\s+([^\s]+)', line): + self.e.data(*m.groups(), size=8) elif m := re.fullmatch(r'4byte\s+([^\s]+)', line): self.e.data(*m.groups()) elif m := re.fullmatch(r'zero\s+([^\s]+)', line): self.e.zero(*m.groups()) - elif m := re.fullmatch(r'byte\s+([^\s]+)', line): - self.e.zero(*m.groups()) elif m := re.fullmatch(r'string\s+\"(.*)\"', line): self.e.strz(*m.groups()) elif m := re.fullmatch(r'asciz\s+\"(.*)\"', line):