Skip to content

Commit

Permalink
fix: DSL store instruction expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
tydeu committed Sep 13, 2021
1 parent 6af1a8d commit d0f2c0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Papyrus/Script/Instructions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ def expandStoreInst : (stx : Syntax) → MacroM Syntax
let isVolatile := quote volatile?.isSome
let order ← expandAtomicOrdering order
let ssid ← expandOptSyncScope ssid?
``(store $val $ptr $isVolatile $align $order $ssid)
`(doElem| store $val $ptr $isVolatile $align $order $ssid)
| `(storeInst|
store $[volatile%$volatile?]? $val:llvmValue, $ptr:llvmValue
$[, align $align?]?) => do
let val ← expandValueAsRefArrow val
let ptr ← expandValueAsRefArrow ptr
let isVolatile := quote volatile?.isSome
let align ← expandOptAlign align?
``(store $val $ptr $isVolatile $align)
`(doElem| store $val $ptr $isVolatile $align)
| inst => Macro.throwErrorAt inst "ill-formed store instruction"

macro x:storeInst : bbDoElem => expandStoreInst x
Expand Down

0 comments on commit d0f2c0b

Please sign in to comment.