enhanced hanlding for immediates with shifting

This commit is contained in:
JanLJL
2020-10-21 12:14:21 +02:00
parent b5b1a1f2b2
commit a7918db145
2 changed files with 12 additions and 1 deletions

View File

@@ -406,7 +406,9 @@ class ParserAArch64(BaseParser):
# normal integer value, nothing to do
return AttrDict({self.IMMEDIATE_ID: immediate})
if 'base_immediate' in immediate:
# arithmetic immediate, nothing to do
# arithmetic immediate, add calculated value as value
immediate['shift'] = immediate['shift'][0]
immediate['value'] = int(immediate['base_immediate']['value']) << int(immediate['shift']['value'])
return AttrDict({self.IMMEDIATE_ID: immediate})
if 'float' in immediate:
dict_name = 'float'