Skip to content

Instantly share code, notes, and snippets.

@agustingianni
Created August 20, 2017 13:43
Show Gist options
  • Save agustingianni/2d253bee05232b1a5256b50d83c16ae3 to your computer and use it in GitHub Desktop.
Save agustingianni/2d253bee05232b1a5256b50d83c16ae3 to your computer and use it in GitHub Desktop.
--------------------------------------------------------------------------------
0 | integer n = UInt(Rn); -> [] []
0 | BranchType branch_type; -> [] []
0 | integer m = UInt(Rm); -> [] []
0 | boolean pac = (A == '1'); -> [] []
0 | boolean use_key_a = (M == '0'); -> [] []
0 | boolean source_is_sp = ((Z == '1') && (m == 31)); -> [] []
0 | if !pac && m != 0 then -> ['if'] [0]
4 | UnallocatedEncoding(); -> ['if'] [0]
0 | elsif pac && !HavePACExt() then -> ['if'] [0]
4 | UnallocatedEncoding(); -> ['if'] [0]
0 | endif -> [] []
0 | case op of -> ['case'] [0]
4 | when '00' branch_type = BranchType_JMP; -> ['case'] [0]
4 | when '01' branch_type = BranchType_CALL; -> ['case'] [0]
4 | when '10' branch_type = BranchType_RET; -> ['case'] [0]
4 | otherwise UnallocatedEncoding(); -> ['case'] [0]
0 | endcase -> [] []
0 | if pac then -> ['if'] [0]
4 | if Z == '0' && m != 31 then -> ['if', 'if'] [0, 4]
8 | UnallocatedEncoding(); -> ['if', 'if'] [0, 4]
4 | endif -> ['if'] [0]
4 | if branch_type == BranchType_RET then -> ['if', 'if'] [0, 4]
8 | if n !=31 then UnallocatedEncoding(); -> ['if', 'if'] [0, 4]
8 | n = 30; -> ['if', 'if'] [0, 4]
8 | source_is_sp = TRUE; -> ['if', 'if'] [0, 4]
0 | endif -> ['if'] [0]
0 | endif -> [] []
0 | -> [] []
--------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment