diff options
Diffstat (limited to 'cpu/xc16x.cpu')
-rw-r--r-- | cpu/xc16x.cpu | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cpu/xc16x.cpu b/cpu/xc16x.cpu index 1d2057a..4903b81 100644 --- a/cpu/xc16x.cpu +++ b/cpu/xc16x.cpu @@ -528,6 +528,15 @@ (comment "segment") ) +;; Define an operand that takes a set of handlers. +;; dowh: define-operand-with-handlers +(define-pmacro (dowh x-name x-comment x-attrs x-type x-index x-handlers) + (define-operand (name x-name) (comment x-comment) + (.splice attrs (.unsplice x-attrs)) + (type x-type) (index x-index) + (.splice handlers (.unsplice x-handlers))) +) + (dnop sr "source register" () h-gr f-r2) (dnop dr "destination register" () h-gr f-r1) (dnop dri "destination register" () h-gr f-r4) @@ -544,7 +553,7 @@ (dnop uimm7 "7 bit trap number" (HASH-PREFIX) h-uint f-uimm7) (dnop uimm8 "8 bit unsigned immediate" (HASH-PREFIX) h-uint f-uimm8) (dnop uimm16 "16 bit unsigned immediate" (HASH-PREFIX) h-uint f-uimm16) -(dnop upof16 "16 bit unsigned immediate" (POF-PREFIX) h-addr f-memory) +(dowh upof16 "16 bit unsigned immediate" (POF-PREFIX) h-addr f-memory ((print "with_pof_prefix"))) (dnop reg8 "8 bit word register number" () h-r8 f-reg8) (dnop regmem8 "8 bit word register number" () h-regmem8 f-regmem8) (dnop regbmem8 "8 bit byte register number" () h-regbmem8 f-regmem8) @@ -573,16 +582,16 @@ (dnop memory "16 bit memory" () h-addr f-memory) (dnop memgr8 "16 bit memory" () h-memgr8 f-memgr8) (dnop cbit "carry bit" (SEM-ONLY) h-cbit f-nil) -(dnop qbit "bit addr" (DOT-PREFIX) h-uint f-qbit) -(dnop qlobit "bit addr" (DOT-PREFIX) h-uint f-qlobit) -(dnop qhibit "bit addr" (DOT-PREFIX) h-uint f-qhibit) +(dowh qbit "bit addr" (DOT-PREFIX) h-uint f-qbit ((print "with_dot_prefix"))) +(dowh qlobit "bit addr" (DOT-PREFIX) h-uint f-qlobit ((print "with_dot_prefix"))) +(dowh qhibit "bit addr" (DOT-PREFIX) h-uint f-qhibit ((print "with_dot_prefix"))) (dnop mask8 "8 bit mask" (HASH-PREFIX) h-uint f-mask8) (dnop masklo8 "8 bit mask" (HASH-PREFIX) h-uint f-datahi8) (dnop pagenum "10 bit page number" (HASH-PREFIX) h-uint f-pagenum) (dnop data8 "8 bit data" (HASH-PREFIX) h-uint f-data8) (dnop datahi8 "8 bit data" (HASH-PREFIX) h-uint f-datahi8) (dnop sgtdisbit "segmentation enable bit" (SEM-ONLY) h-sgtdis f-nil) -(dnop upag16 "16 bit unsigned immediate" (PAG-PREFIX) h-uint f-uimm16) +(dowh upag16 "16 bit unsigned immediate" (PAG-PREFIX) h-uint f-uimm16 ((print "with_pag_prefix"))) (dnop useg8 "8 bit segment " (SEG-PREFIX) h-uint f-seg8) (dnop useg16 "16 bit address offset" (SEG-PREFIX) h-uint f-offset16) (dnop usof16 "16 bit address offset" (SOF-PREFIX) h-uint f-offset16) |