-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arm large stack #677
Arm large stack #677
Conversation
compiler/src/arm_arch_full.ml
Outdated
@@ -26,6 +26,9 @@ module Arm_core = struct | |||
|
|||
let known_implicits = ["NF", "_nf_"; "ZF", "_zf_"; "CF", "_cf_"; "VF", "_vf_"] | |||
|
|||
let alloc_stack_need_extra sz = | |||
not (Arm_decl.is_expandable (Conv.cz_of_z sz)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this check corresponds to whether we can allocate/free stack with SUB sp, sp, #imm
and ADD sp, sp, #imm
, we can also allow 12-bit immediates. We should have is_expandable || is_w12_encoding
(this corresponds to encodings T3 and T4 from the manual, e.g. A7.7.5 for ADD).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now use is_arith_small
proofs/compiler/arm_params.v
Outdated
@@ -79,12 +79,18 @@ Section LINEARIZATION. | |||
Notation vtmpi := (mk_var_i (to_var R12)). | |||
|
|||
(* TODO_ARM: This assumes 0 <= sz < 4096. *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have remove the comment.
proofs/compiler/arm_params.v
Outdated
if tmp is Some aux then | ||
arm_cmd_large_subi_tmp rspi aux sz | ||
else | ||
[:: arm_op_subi rspi rspi sz]. | ||
|
||
(* TODO_ARM: This assumes 0 <= sz < 4096. *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what do you means here ? What is not longer true ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
fec6d2c
to
190eeee
Compare
77007ea
to
00731a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! Thanks.
Fix the generate code for arm when stack is large.