File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -191,11 +191,14 @@ let compile (type reg regx xreg rflag cond asm_op extra_op)
191
191
then Some (UseLea , " LEA instruction is used" )
192
192
else None
193
193
| Split_memory_access ->
194
- let msg =
195
- " This memory immediate does not fit in one instruction, several \
196
- instructions were issued."
197
- in
198
- Some (SplitMemoryAccess , msg)
194
+ if not ! Glob_options. split_memory_access
195
+ then
196
+ let msg =
197
+ " This memory immediate does not fit in one instruction, several \
198
+ instructions were issued."
199
+ in
200
+ Some (SplitMemoryAccess , msg)
201
+ else None
199
202
in
200
203
let loc, _ = ii in
201
204
Option. may (fun (w , msg ) -> warning w loc " %s" msg) o;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ type color = | Auto | Always | Never
25
25
let color = ref Auto
26
26
27
27
let lea = ref false
28
+ let split_memory_access = ref false
28
29
let set0 = ref false
29
30
let model = ref Normal
30
31
let print_stack_alloc = ref false
@@ -172,6 +173,9 @@ let options = [
172
173
" -I" , Arg. String set_idirs , " [ident:path] Bind ident to path for from ident require ..." ;
173
174
" -lea" , Arg. Set lea , " Use lea as much as possible (default is nolea)" ;
174
175
" -nolea" , Arg. Clear lea , " Try to use add and mul instead of lea" ;
176
+ " -split-memory-access"
177
+ , Arg. Set split_memory_access
178
+ , " Split large memory accesses in several instructions" ;
175
179
" -set0" , Arg. Set set0 , " Use [xor x x] to set x to 0 (default is not)" ;
176
180
" -noset0" , Arg. Clear set0 , " Do not use set0 option" ;
177
181
" -ec" , Arg. String set_ec , " [f] Extract function [f] and its dependencies to an easycrypt file (deprecated)" ;
You can’t perform that action at this time.
0 commit comments