Skip to content

Commit

Permalink
Zero $flag on call (#585)
Browse files Browse the repository at this point in the history
VM PR: FuelLabs/fuel-vm#743

Called contracts shouldn't inherit the `$flag` register.

### Before requesting review
- [x] I have reviewed the code myself
  • Loading branch information
Dentosal authored Jun 3, 2024
1 parent dc3623c commit 7637bef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fuel-vm/instruction-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,7 @@ A [call frame](./index.md#call-frames) is pushed at `$sp`. In addition to fillin
1. `$fp = $sp` (on top of the previous call frame is the beginning of this call frame)
1. Set `$ssp` and `$sp` to the start of the writable stack area of the call frame.
1. Set `$pc` and `$is` to the starting address of the code.
1. `$flag` set to zero.
1. `$bal = $rB` (forward coins)
1. `$cgas = $rD` or all available gas (forward gas)

Expand Down

0 comments on commit 7637bef

Please sign in to comment.