diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-03-20 17:47:57 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-03-20 17:48:34 +0100 |
commit | 7186a01ab4278102ec4e21d3cf67795d51973365 (patch) | |
tree | 29b627f23bb17606b5ea89397031d1b27b7c1c9d /compiler/nativeGen | |
parent | 08d254bc8452cdb12f852805f20d346ad4181ed8 (diff) | |
download | haskell-7186a01ab4278102ec4e21d3cf67795d51973365.tar.gz |
Dwarf: Add support for labels in unwind expressions
Test Plan: Look at DWARF output.
Reviewers: scpmw, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1734
Diffstat (limited to 'compiler/nativeGen')
-rw-r--r-- | compiler/nativeGen/Dwarf/Constants.hs | 3 | ||||
-rw-r--r-- | compiler/nativeGen/Dwarf/Types.hs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/nativeGen/Dwarf/Constants.hs b/compiler/nativeGen/Dwarf/Constants.hs index 40e4e7d9a8..880c7d77a0 100644 --- a/compiler/nativeGen/Dwarf/Constants.hs +++ b/compiler/nativeGen/Dwarf/Constants.hs @@ -126,9 +126,10 @@ dW_CFA_val_expression = 0x16 dW_CFA_offset = 0x80 -- * Operations -dW_OP_deref, dW_OP_consts, +dW_OP_addr, dW_OP_deref, dW_OP_consts, dW_OP_minus, dW_OP_mul, dW_OP_plus, dW_OP_lit0, dW_OP_breg0, dW_OP_call_frame_cfa :: Word8 +dW_OP_addr = 0x03 dW_OP_deref = 0x06 dW_OP_consts = 0x11 dW_OP_minus = 0x1c diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs index e0214e568a..0db24194a2 100644 --- a/compiler/nativeGen/Dwarf/Types.hs +++ b/compiler/nativeGen/Dwarf/Types.hs @@ -446,6 +446,7 @@ pprUnwindExpr spIsCFA expr pprE (UwReg g i) = pprByte (dW_OP_breg0+dwarfGlobalRegNo plat g) $$ pprLEBInt i pprE (UwDeref u) = pprE u $$ pprByte dW_OP_deref + pprE (UwLabel l) = pprByte dW_OP_addr $$ pprWord (ppr l) pprE (UwPlus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_plus pprE (UwMinus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_minus pprE (UwTimes u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_mul |