use lib functions
This commit is contained in:
parent
cd8e36f7e4
commit
f960f9c23b
1 changed files with 2 additions and 7 deletions
|
@ -563,14 +563,9 @@ module FrameManager (IS : InstructionSelector) : FrameManager = struct
|
|||
let location_of fd id : T.address =
|
||||
match S.IdMap.find_opt id fd.stack_map with
|
||||
(* Si on retrouve id dans la stack map, alors c'est une variable locale *)
|
||||
| Some o -> { offset = Some (Lit o); base = Some RBP; idx = None; scale = `One }
|
||||
| Some o -> T.addr ~offset:(Lit o) ~base:RBP ()
|
||||
(* Sinon, variable globale *)
|
||||
| None ->
|
||||
{ offset = Some (Lab (data_label_of_global id))
|
||||
; base = Some RIP
|
||||
; idx = None
|
||||
; scale = `One
|
||||
}
|
||||
| None -> T.addr ~offset:(Lab (data_label_of_global id)) ~base:RIP ()
|
||||
;;
|
||||
|
||||
let function_prologue fd =
|
||||
|
|
Reference in a new issue