;; Constants for dwarf-emit.lisp. ;; Call frame information opcodes ;; these appear supported at least back to libgcc 3.3. (defconstant +DW-CFA-advance-loc+ #x40) (defconstant +DW-CFA-offset+ #x80) (defconstant +DW-CFA-restore+ #xc0) ;; broken in gcc: sets undefined, not cie default (defconstant +DW-CFA-nop+ #x00) (defconstant +DW-CFA-set-loc+ #x01) (defconstant +DW-CFA-advance-loc1+ #x02) (defconstant +DW-CFA-advance-loc2+ #x03) (defconstant +DW-CFA-advance-loc4+ #x04) (defconstant +DW-CFA-offset-extended+ #x05) (defconstant +DW-CFA-restore-extended+ #x06) ;; broken in gcc: sets undefined, not cie default (defconstant +DW-CFA-undefined+ #x07) (defconstant +DW-CFA-same-value+ #x08) (defconstant +DW-CFA-register+ #x09) (defconstant +DW-CFA-remember-state+ #x0a) (defconstant +DW-CFA-restore-state+ #x0b) (defconstant +DW-CFA-def-cfa+ #x0c) (defconstant +DW-CFA-def-cfa-register+ #x0d) (defconstant +DW-CFA-def-cfa-offset+ #x0e) ;; DWARF 3. (defconstant +DW-CFA-def-cfa-expression+ #x0f) (defconstant +DW-CFA-expression+ #x10) (defconstant +DW-CFA-offset-extended-sf+ #x11) (defconstant +DW-CFA-def-cfa-sf+ #x12) (defconstant +DW-CFA-def-cfa-offset-sf+ #x13) ;; these aren't even supported in gcc 4.1. ; (defconstant +DW-CFA-val-offset+ #x14) ; (defconstant +DW-CFA-val-offset-sf+ #x15) ; (defconstant +DW-CFA-val-expression+ #x16) ;; SGI/MIPS specific. (defconstant +DW-CFA-MIPS-advance-loc8+ #x1d) ;; GNU extensions. (defconstant +DW-CFA-GNU-window-save+ #x2d) ; hardcoded for SPARC register window configuration (defconstant +DW-CFA-GNU-args-size+ #x2e) ;(defconstant +DW-CFA-GNU-negative-offset-extended+ #x2f) ; obsoleted by DW-CFA-offset-extended-sf ;; Dwarf expression atoms ;; these are supported at least back to libgcc 3.3 (defconstant +DW-OP-addr+ #x03) (defconstant +DW-OP-deref+ #x06) (defconstant +DW-OP-const1u+ #x08) (defconstant +DW-OP-const1s+ #x09) (defconstant +DW-OP-const2u+ #x0a) (defconstant +DW-OP-const2s+ #x0b) (defconstant +DW-OP-const4u+ #x0c) (defconstant +DW-OP-const4s+ #x0d) (defconstant +DW-OP-const8u+ #x0e) (defconstant +DW-OP-const8s+ #x0f) (defconstant +DW-OP-constu+ #x10) (defconstant +DW-OP-consts+ #x11) (defconstant +DW-OP-dup+ #x12) (defconstant +DW-OP-drop+ #x13) (defconstant +DW-OP-over+ #x14) (defconstant +DW-OP-pick+ #x15) ;(defconstant +DW-OP-swap+ #x16) ; not supported as of libgcc 4.1 -- WTF? (defconstant +DW-OP-rot+ #x17) ;(defconstant +DW-OP-xderef+ #x18) ; not supported as of libgcc 4.1 (defconstant +DW-OP-abs+ #x19) (defconstant +DW-OP-and+ #x1a) (defconstant +DW-OP-div+ #x1b) (defconstant +DW-OP-minus+ #x1c) (defconstant +DW-OP-mod+ #x1d) (defconstant +DW-OP-mul+ #x1e) (defconstant +DW-OP-neg+ #x1f) (defconstant +DW-OP-not+ #x20) (defconstant +DW-OP-or+ #x21) (defconstant +DW-OP-plus+ #x22) (defconstant +DW-OP-plus-uconst+ #x23) (defconstant +DW-OP-shl+ #x24) (defconstant +DW-OP-shr+ #x25) (defconstant +DW-OP-shra+ #x26) (defconstant +DW-OP-xor+ #x27) (defconstant +DW-OP-bra+ #x28) (defconstant +DW-OP-eq+ #x29) (defconstant +DW-OP-ge+ #x2a) (defconstant +DW-OP-gt+ #x2b) (defconstant +DW-OP-le+ #x2c) (defconstant +DW-OP-lt+ #x2d) (defconstant +DW-OP-ne+ #x2e) (defconstant +DW-OP-skip+ #x2f) (defconstant +DW-OP-lit0+ #x30) (defconstant +DW-OP-lit1+ #x31) (defconstant +DW-OP-lit2+ #x32) (defconstant +DW-OP-lit3+ #x33) (defconstant +DW-OP-lit4+ #x34) (defconstant +DW-OP-lit5+ #x35) (defconstant +DW-OP-lit6+ #x36) (defconstant +DW-OP-lit7+ #x37) (defconstant +DW-OP-lit8+ #x38) (defconstant +DW-OP-lit9+ #x39) (defconstant +DW-OP-lit10+ #x3a) (defconstant +DW-OP-lit11+ #x3b) (defconstant +DW-OP-lit12+ #x3c) (defconstant +DW-OP-lit13+ #x3d) (defconstant +DW-OP-lit14+ #x3e) (defconstant +DW-OP-lit15+ #x3f) (defconstant +DW-OP-lit16+ #x40) (defconstant +DW-OP-lit17+ #x41) (defconstant +DW-OP-lit18+ #x42) (defconstant +DW-OP-lit19+ #x43) (defconstant +DW-OP-lit20+ #x44) (defconstant +DW-OP-lit21+ #x45) (defconstant +DW-OP-lit22+ #x46) (defconstant +DW-OP-lit23+ #x47) (defconstant +DW-OP-lit24+ #x48) (defconstant +DW-OP-lit25+ #x49) (defconstant +DW-OP-lit26+ #x4a) (defconstant +DW-OP-lit27+ #x4b) (defconstant +DW-OP-lit28+ #x4c) (defconstant +DW-OP-lit29+ #x4d) (defconstant +DW-OP-lit30+ #x4e) (defconstant +DW-OP-lit31+ #x4f) (defconstant +DW-OP-reg0+ #x50) (defconstant +DW-OP-reg1+ #x51) (defconstant +DW-OP-reg2+ #x52) (defconstant +DW-OP-reg3+ #x53) (defconstant +DW-OP-reg4+ #x54) (defconstant +DW-OP-reg5+ #x55) (defconstant +DW-OP-reg6+ #x56) (defconstant +DW-OP-reg7+ #x57) (defconstant +DW-OP-reg8+ #x58) (defconstant +DW-OP-reg9+ #x59) (defconstant +DW-OP-reg10+ #x5a) (defconstant +DW-OP-reg11+ #x5b) (defconstant +DW-OP-reg12+ #x5c) (defconstant +DW-OP-reg13+ #x5d) (defconstant +DW-OP-reg14+ #x5e) (defconstant +DW-OP-reg15+ #x5f) (defconstant +DW-OP-reg16+ #x60) (defconstant +DW-OP-reg17+ #x61) (defconstant +DW-OP-reg18+ #x62) (defconstant +DW-OP-reg19+ #x63) (defconstant +DW-OP-reg20+ #x64) (defconstant +DW-OP-reg21+ #x65) (defconstant +DW-OP-reg22+ #x66) (defconstant +DW-OP-reg23+ #x67) (defconstant +DW-OP-reg24+ #x68) (defconstant +DW-OP-reg25+ #x69) (defconstant +DW-OP-reg26+ #x6a) (defconstant +DW-OP-reg27+ #x6b) (defconstant +DW-OP-reg28+ #x6c) (defconstant +DW-OP-reg29+ #x6d) (defconstant +DW-OP-reg30+ #x6e) (defconstant +DW-OP-reg31+ #x6f) (defconstant +DW-OP-breg0+ #x70) (defconstant +DW-OP-breg1+ #x71) (defconstant +DW-OP-breg2+ #x72) (defconstant +DW-OP-breg3+ #x73) (defconstant +DW-OP-breg4+ #x74) (defconstant +DW-OP-breg5+ #x75) (defconstant +DW-OP-breg6+ #x76) (defconstant +DW-OP-breg7+ #x77) (defconstant +DW-OP-breg8+ #x78) (defconstant +DW-OP-breg9+ #x79) (defconstant +DW-OP-breg10+ #x7a) (defconstant +DW-OP-breg11+ #x7b) (defconstant +DW-OP-breg12+ #x7c) (defconstant +DW-OP-breg13+ #x7d) (defconstant +DW-OP-breg14+ #x7e) (defconstant +DW-OP-breg15+ #x7f) (defconstant +DW-OP-breg16+ #x80) (defconstant +DW-OP-breg17+ #x81) (defconstant +DW-OP-breg18+ #x82) (defconstant +DW-OP-breg19+ #x83) (defconstant +DW-OP-breg20+ #x84) (defconstant +DW-OP-breg21+ #x85) (defconstant +DW-OP-breg22+ #x86) (defconstant +DW-OP-breg23+ #x87) (defconstant +DW-OP-breg24+ #x88) (defconstant +DW-OP-breg25+ #x89) (defconstant +DW-OP-breg26+ #x8a) (defconstant +DW-OP-breg27+ #x8b) (defconstant +DW-OP-breg28+ #x8c) (defconstant +DW-OP-breg29+ #x8d) (defconstant +DW-OP-breg30+ #x8e) (defconstant +DW-OP-breg31+ #x8f) (defconstant +DW-OP-regx+ #x90) ;(defconstant +DW-OP-fbreg+ #x91) ; not supported as of libgcc 4.1 (defconstant +DW-OP-bregx+ #x92) ;(defconstant +DW-OP-piece+ #x93) ; not supported as of libgcc 4.1 (defconstant +DW-OP-deref-size+ #x94) ;(defconstant +DW-OP-xderef-size+ #x95) ; not supported as of libgcc 4.1 (defconstant +DW-OP-nop+ #x96) ;; DWARF 3 extensions ;; none of these are allowed in a DW-CFA-*expression rule, though ;(defconstant +DW-OP-push-object-address+ #x97) ;(defconstant +DW-OP-call2 = #x98) ;(defconstant +DW-OP-call4 = #x99) ;(defconstant +DW-OP-call-ref = #x9a) ;; GNU extensions. (not supported by libgcc 4.1) ;(defconstant +DW-OP-GNU-push-tls-address = #xe0) ;; address encodings. Combine two half-bytes to make one value (defconstant +DW-EH-PE-absptr+ #x00) ; default value (defconstant +DW-EH-PE-omit+ #xff) ; not in the spec.. (defconstant +DW-EH-PE-uleb128+ #x01) (defconstant +DW-EH-PE-udata2+ #x02) (defconstant +DW-EH-PE-udata4+ #x03) (defconstant +DW-EH-PE-udata8+ #x04) (defconstant +DW-EH-PE-sleb128+ #x09) (defconstant +DW-EH-PE-sdata2+ #x0A) (defconstant +DW-EH-PE-sdata4+ #x0B) (defconstant +DW-EH-PE-sdata8+ #x0C) (defconstant +DW-EH-PE-signed+ #x08) (defconstant +DW-EH-PE-pcrel+ #x10) (defconstant +DW-EH-PE-textrel+ #x20) (defconstant +DW-EH-PE-datarel+ #x30) (defconstant +DW-EH-PE-funcrel+ #x40) (defconstant +DW-EH-PE-aligned+ #x50) ; not in the spec.. (defconstant +DW-EH-PE-indirect+ #x80) ; not in the spec.. ;; other constants (defconstant +dw-cie-id+ 0) (defconstant +dw-cie-version+ 1) #+x86-64 (defconstant +ptr-size+ 8) #+x86-64 (defconstant +dwarf-cie-data-alignment+ -8) ;; x86-64 register defns: #+x86-64 (progn (defconstant +dw-reg-rax+ 0) (defconstant +dw-reg-rbx+ 1) (defconstant +dw-reg-rcx+ 2) (defconstant +dw-reg-rdx+ 3) (defconstant +dw-reg-rsi+ 4) (defconstant +dw-reg-rdi+ 5) (defconstant +dw-reg-rbp+ 6) (defconstant +dw-reg-rsp+ 7) (defconstant +dw-reg-r8+ 8) (defconstant +dw-reg-r9+ 9) (defconstant +dw-reg-r10+ 10) (defconstant +dw-reg-r11+ 11) (defconstant +dw-reg-r12+ 12) (defconstant +dw-reg-r13+ 13) (defconstant +dw-reg-r14+ 14) (defconstant +dw-reg-r15+ 15) (defconstant +dw-reg-ra+ 16) ; 'virtual' register: return address (defconstant +dw-reg-xmm0+ 17) (defconstant +dw-reg-xmm1+ 18) (defconstant +dw-reg-xmm2+ 19) (defconstant +dw-reg-xmm3+ 20) (defconstant +dw-reg-xmm4+ 21) (defconstant +dw-reg-xmm5+ 22) (defconstant +dw-reg-xmm6+ 23) (defconstant +dw-reg-xmm7+ 24) (defconstant +dw-reg-xmm8+ 25) (defconstant +dw-reg-xmm9+ 26) (defconstant +dw-reg-xmm10+ 27) (defconstant +dw-reg-xmm11+ 28) (defconstant +dw-reg-xmm12+ 29) (defconstant +dw-reg-xmm13+ 30) (defconstant +dw-reg-xmm14+ 31) (defconstant +dw-reg-xmm15+ 32) (defconstant +dw-reg-st0+ 33) (defconstant +dw-reg-st1+ 34) (defconstant +dw-reg-st2+ 35) (defconstant +dw-reg-st3+ 36) (defconstant +dw-reg-st4+ 37) (defconstant +dw-reg-st5+ 38) (defconstant +dw-reg-st6+ 39) (defconstant +dw-reg-st7+ 40) (defconstant +dw-reg-mm0+ 41) (defconstant +dw-reg-mm1+ 42) (defconstant +dw-reg-mm2+ 43) (defconstant +dw-reg-mm3+ 44) (defconstant +dw-reg-mm4+ 45) (defconstant +dw-reg-mm5+ 46) (defconstant +dw-reg-mm6+ 47) (defconstant +dw-reg-mm7+ 48) )