rv2fox: Understand bgt
and bgtu
This commit is contained in:
parent
259f524fd1
commit
7f6ccfc7f1
|
@ -158,7 +158,7 @@ class Converter:
|
||||||
self.xregidx = { r: i for i, r in enumerate(self.xregs) }
|
self.xregidx = { r: i for i, r in enumerate(self.xregs) }
|
||||||
|
|
||||||
self.tmp = 'rfp' # temporary register
|
self.tmp = 'rfp' # temporary register
|
||||||
self.branches = ['bge', 'bgeu', 'blt', 'bltu', 'ble', 'bleu', 'bne', 'bneu']
|
self.branches = ['bge', 'bgeu', 'bgt', 'bgtu', 'blt', 'bltu', 'ble', 'bleu', 'bne', 'bneu']
|
||||||
|
|
||||||
self.label_gen = iter(range(1000000))
|
self.label_gen = iter(range(1000000))
|
||||||
|
|
||||||
|
@ -240,6 +240,7 @@ class Converter:
|
||||||
if op in ['bne', 'bnez']: return 'ifnz', False
|
if op in ['bne', 'bnez']: return 'ifnz', False
|
||||||
if op in ['ble', 'bleu']: return 'ifgt', True
|
if op in ['ble', 'bleu']: return 'ifgt', True
|
||||||
if op in ['bge', 'bgeu']: return 'ifgteq', False
|
if op in ['bge', 'bgeu']: return 'ifgteq', False
|
||||||
|
if op in ['bgt', 'bgtu']: return 'ifgt', False
|
||||||
|
|
||||||
def convert_branch(self, insn, rs1, rs2, label):
|
def convert_branch(self, insn, rs1, rs2, label):
|
||||||
cond, reverse = self.convert_condition(insn)
|
cond, reverse = self.convert_condition(insn)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user