mescc: Tinycc support: multi-byte [local] offsets.

* stage0/x86.M1: Add 32bit variants for all 8bit instructions.
* module/mes/as-i386.mes: Use them, switch on size.
This commit is contained in:
Jan Nieuwenhuizen 2017-07-24 08:36:43 +02:00
parent af626da19a
commit accf4159a4
4 changed files with 223 additions and 143 deletions

View file

@ -898,12 +898,12 @@
(if (<= size 4) (wrap-as (i386:base->accu-address))
(append
(wrap-as (i386:base-address->accu-address))
(wrap-as (append (i386:accu+n 4)
(i386:base+n 4)
(wrap-as (append (i386:accu+value 4)
(i386:base+value 4)
(i386:base-address->accu-address)))
(if (<= size 8) '()
(wrap-as (append (i386:accu+n 4)
(i386:base+n 4)
(wrap-as (append (i386:accu+value 4)
(i386:base+value 4)
(i386:base-address->accu-address)))))))))))
((i-sel (ident ,field) ,array)

View file

@ -31,11 +31,11 @@
(mes-use-module (mes as))))
(define (i386:nop)
'(("nop"))) ; nop
'(("nop")))
(define (i386:function-preamble)
'(("push___%ebp") ; push %ebp
("mov____%esp,%ebp"))) ; mov %esp,%ebp;
'(("push___%ebp")
("mov____%esp,%ebp")))
(define (i386:function-locals)
'(("sub____%esp,$i8" (#:immediate1 #x40)))) ; sub %esp,$0x40 # 16 local vars
@ -47,33 +47,135 @@
`(("mov____0x32,%eax" (#:address ,label)) ; mov 0x804a000,%eax
("push___%eax"))) ; push %eax
;;; locals
(define (i386:push-local n)
(or n (error "invalid value: push-local: " n))
`(("push___0x8(%ebp)" (#:immediate1 ,(- 0 (* 4 n)))))) ; pushl 0x<n>(%ebp)
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("push___0x8(%ebp)" (#:immediate1 ,n))
`("push___0x32(%ebp)" (#:immediate ,n))))))
(define (i386:push-local-address n)
(or n (error "invalid value: push-local-address: " n))
`(("lea____0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))) ; lea 0x<n>(%ebp),%eax
("push___%eax"))) ; push %eax
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("lea____0x8(%ebp),%eax" (#:immediate1 ,n))
`("lea____0x32(%ebp),%eax" (#:immediate ,n)))
("push___%eax"))))
(define (i386:push-byte-local-de-ref n)
(or n (error "invalid value: push-byte-local-de-ref: " n))
`(("mov____0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))) ; mov -0x<n>(%ebp),%eax
("movzbl_(%eax),%eax") ; movzbl (%eax),%eax
("push___%eax"))) ; push %eax
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____0x8(%ebp),%eax" (#:immediate1 ,n))
`("mov____0x32(%ebp),%eax" (#:immediate ,n)))
("movzbl_(%eax),%eax")
("push___%eax"))))
(define (i386:push-byte-local-de-de-ref n)
(or n (error "invalid value: push-byte-local-de-de-ref: " n))
`(("mov____0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))) ; mov -0x<n>(%ebp),%eax
("mov____(%eax),%eax") ; mov (%eax),%eax
("movzbl_(%eax),%eax") ; movzbl (%eax),%eax
("push___%eax")))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____0x8(%ebp),%eax" (#:immediate1 ,n))
`("mov____0x32(%ebp),%eax" (#:immediate ,n)))
("mov____(%eax),%eax")
("movzbl_(%eax),%eax")
("push___%eax"))))
(define (i386:push-local-de-ref n)
(or n (error "invalid value: push-byte-local-de-ref: " n))
`(("mov____0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))) ; mov -0x<n>(%ebp),%eax
("mov____(%eax),%eax") ; mov (%eax),%eax
("push___%eax"))) ; push %eax
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____0x8(%ebp),%eax" (#:immediate1 ,n))
`("mov____0x32(%ebp),%eax" (#:immediate ,n)))
("mov____(%eax),%eax")
("push___%eax"))))
(define (i386:local-add n v)
(or n (error "invalid value: i386:local-add: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (and (< (abs n) #x80)
(< (abs v) #x80)) `("add____$i8,0x8(%ebp)" (#:immediate1 ,n) (#:immediate1 ,v))
`("add____$i32,0x32(%ebp)" (#:immediate ,n) (#:immediate ,v))))))
(define (i386:accu->local n)
(or n (error "invalid value: accu->local: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____%eax,0x8(%ebp)" (#:immediate1 ,n))
`("mov____%eax,0x32(%ebp)" (#:immediate ,n))))))
(define (i386:base->local n)
(or n (error "invalid value: base->local: " n))
`(("mov____%edx,0x8(%ebp)" ,(- 0 (* 4 n))))) ; mov %edx,-<0xn>(%ebp)
(define (i386:base->local n)
(or n (error "invalid value: base->local: " n))
(let ((n (- 0 (* 4 n))))
`((if (< (abs n) #x80) `("mov____%edx,0x8(%ebp)" (#:immediate1 ,n))
`("mov____%edx,0x32(%ebp)" (#:immediate ,n))))))
(define (i386:local->accu n)
(or n (error "invalid value: local->accu: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____0x8(%ebp),%eax" (#:immediate1 ,n))
`("mov____0x32(%ebp),%eax" (#:immediate ,n))))))
(define (i386:local-address->accu n)
(or n (error "invalid value: ladd: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("lea____0x8(%ebp),%eax" (#:immediate1 ,n))
`("lea____0x32(%ebp),%eax" (#:immediate ,n))))))
(define (i386:local-ptr->accu n)
(or n (error "invalid value: local-ptr->accu: " n))
(let ((n (- 0 (* 4 n))))
`(("mov____%ebp,%eax") ; mov %ebp,%eax
,(if (< (abs n) #x80) `("add____$i8,%eax" (#:immediate1 ,n))
`("add____$i32,%eax" (#:immediate ,n))))))
(define (i386:byte-local->accu n)
(or n (error "invalid value: byte-local->accu: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("movzbl_0x8(%ebp),%eax" (#:immediate1 ,n))
`("movzbl_0x32(%ebp),%eax" (#:immediate ,n))))))
(define (i386:byte-local->base n)
(or n (error "invalid value: byte-local->base: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("movzbl_0x8(%ebp),%edx" (#:immediate1 ,n))
`,@(("mov_0x32(%ebp),%edx" (#:immediate ,n))
("movzbl_%dl,%edx"))))))
(define (i386:local->base n)
(or n (error "invalid value: local->base: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____0x8(%ebp),%edx" (#:immediate1 ,n))
`("mov____0x32(%ebp),%edx" (#:immediate ,n))))))
(define (i386:local-address->base n) ;; DE-REF
(or n (error "invalid value: local-address->base: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("lea____0x8(%ebp),%edx" (#:immediate1 ,n))
`("lea____0x32(%ebp),%edx" (#:immediate ,n))))))
(define (i386:local-ptr->base n)
(or n (error "invalid value: local-ptr->base: " n))
(let ((n (- 0 (* 4 n))))
`(("mov____%ebp,%edx") ; mov %ebp,%edx
,(if (< (abs n) #x80) `("add____$i8,%edx" (#:immediate1 ,n))
`("add____$i32,%edx" (#:immediate ,n))))))
(define (i386:value->local n v)
(or n (error "invalid value: value->local: " n))
(let ((n (- 0 (* 4 n))))
`(,(if (< (abs n) #x80) `("mov____$i32,0x8(%ebp)" (#:immediate1 ,n) (#:immediate ,v))
`("mov____$i32,0x32(%ebp)" (#:immediate ,n) (#:immediate ,v))))))
(define (i386:local-test n v)
(or n (error "invalid value: local-test: " n))
(let ((n (- 0 (* 4 n))))
`(,(cond ((and (< (abs n) #x80)
(< (abs v) #x80)) `("cmp____$i8,0x8(%ebp)" (#:immediate1 ,n) (#:immediate1 ,v)))
((< (abs n) #x80) `("cmp____$i32,0x8(%ebp)" (#:immediate1 ,n) (#:immediate ,v)))
((< (abs v) #x80) `("cmp____$i8,0x32(%ebp)" (#:immediate ,n) (#:immediate1 ,v)))
(else `("cmp____$i32,0x32(%ebp)" (#:immediate ,n) (#:immediate ,v)))))))
(define (i386:pop-accu)
'(("pop____%eax"))) ; pop %eax
@ -102,19 +204,8 @@
(define (i386:accu->base-address+n n)
(or n (error "invalid value: accu->base-address+n: " n))
`(("mov____%eax,0x8(%edx)" (#:immediate1 ,n)))) ; mov %eax,$0x<n>%(edx)
(define (i386:accu->local n)
(or n (error "invalid value: accu->local: " n))
`(("mov____%eax,0x8(%ebp)" (#:immediate1 ,(- 0 (* 4 n)))))) ; mov %eax,-<0xn>(%ebp)
;; (define (i386:accu->local-address n)
;; (or n (error "invalid value: accu->local: " n))
;; `(#x89 #x45 ,(- 0 (* 4 n)))) ; mov %eax,-<0xn>(%ebp)
(define (i386:base->local n)
(or n (error "invalid value: base->local: " n))
`(("mov____%edx,0x8(%ebp)" ,(- 0 (* 4 n))))) ; mov %edx,-<0xn>(%ebp)
`(,(if (< (abs n) #x80) `("mov____%eax,0x8(%edx)" (#:immediate1 ,n))
`("mov____%eax,0x32(%edx)" (#:immediate ,n)))))
(define (i386:accu->label label)
`(("mov____%eax,0x32" (#:address ,label)))) ; mov %eax,0x<label>
@ -155,8 +246,12 @@
`(("add____%edx,%eax"))) ; add %edx,%eax
(define (i386:accu+value v)
(or v (error "invalid value: accu+value: " v))
`(("add____$i32,%eax" (#:immediate ,v)))) ; add %eax,$
`(,(if (< (abs v) #x80) `("add____$i8,%eax" (#:immediate1 ,v))
`("add____$i32,%eax" (#:immediate ,v)))))
(define (i386:base+value v)
`(,(if (< (abs v) #x80) `("add____$i8,%edx" (#:immediate1 ,v))
`("add____$i32,%edx" (#:immediate ,v)))))
(define (i386:accu-base)
`(("sub____%edx,%eax"))) ; sub %edx,%eax
@ -178,40 +273,6 @@
(define (i386:base->accu)
'(("mov____%edx,%eax"))) ; mov %edx,%eax
(define (i386:local->accu n)
(or n (error "invalid value: local->accu: " n))
`(("mov____0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))))) ; mov -<0xn>(%ebp),%eax
(define (i386:local-address->accu n)
(or n (error "invalid value: ladd: " n))
`(("lea____0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))))) ; lea 0x<n>(%ebp),%eax
(define (i386:local-ptr->accu n)
(or n (error "invalid value: local-ptr->accu: " n))
`(("mov____%ebp,%eax") ; mov %ebp,%eax
("add____$i8,%eax" (#:immediate1 ,(- 0 (* 4 n)))))) ; add $0x<n>,%eax
(define (i386:byte-local->accu n)
(or n (error "invalid value: byte-local->accu: " n))
`(("movzbl_0x8(%ebp),%eax" (#:immediate1 ,(- 0 (* 4 n)))))) ; movzbl 0x<n>(%ebp),%eax
(define (i386:byte-local->base n)
(or n (error "invalid value: byte-local->base: " n))
`(("movzbl_0x8(%ebp),%edx" (#:immediate1 ,(- 0 (* 4 n)))))) ; movzbl 0x<n>(%ebp),%edx
(define (i386:local->base n)
(or n (error "invalid value: local->base: " n))
`(("mov____0x8(%ebp),%edx" (#:immediate1 ,(- 0 (* 4 n)))))) ; mov -<0xn>(%ebp),%edx
(define (i386:local-address->base n) ;; DE-REF
(or n (error "invalid value: local-address->base: " n))
`(("lea____0x8(%ebp),%edx" (#:immediate1 ,(- 0 (* 4 n)))))) ; lea 0x<n>(%ebp),%edx
(define (i386:local-ptr->base n)
(or n (error "invalid value: local-ptr->base: " n))
`(("mov____%ebp,%edx") ; mov %ebp,%edx
("add____$i8,%edx" (#:immediate1 ,(- 0 (* 4 n)))))) ; add $0x<n>,%edx
(define (i386:label->accu label)
`(("mov____$i32,%eax" (#:address ,label)))) ; mov $<n>,%eax
@ -225,7 +286,8 @@
`(("mov____0x32,%edx" (#:address ,label)))) ; mov 0x<n>,%edx
(define (i386:label-mem-add label v)
`(("add____$i8,0x32" (#:address ,label) (#:immediate1 ,v)))) ; addl $<v>,0x<n>
`(,(if (< (abs v) #x80) `("add____$i8,0x32" (#:address ,label) (#:immediate1 ,v))
`("add____$i32,0x32" (#:address ,label) (#:immediate ,v)))))
(define (i386:byte-base-mem->accu)
'(("add____%edx,%eax") ; add %edx,%eax
@ -248,12 +310,14 @@
'(("mov____(%edx),%edx"))) ; mov (%edx),%edx
(define (i386:mem+n->accu n)
`(("mov____0x8(%eax),%eax" (#:immediate1 ,n)))) ; mov 0x<n>(%eax),%eax
`(,(if (< (abs n) #x80) `("mov____0x8(%eax),%eax" (#:immediate1 ,n))
`("mov____0x32(%eax),%eax" (#:immediate ,n)))))
(define (i386:base-mem+n->accu n)
(or n (error "invalid value: base-mem+n->accu: " n))
`(("add___%edx,%eax") ; add %edx,%eax
("mov____0x8(%eax),%eax" (#:immediate1 ,n)))) ; mov <n>(%eax),%eax
(define (i386:base-mem+n->accu v)
(or v (error "invalid value: base-mem+n->accu: " v))
`(("add___%edx,%eax")
,(if (< (abs v) #x80) `("mov____0x8(%eax),%eax" (#:immediate1 ,v))
`("mov____0x32(%eax),%eax" (#:immediate ,v)))))
(define (i386:value->accu v)
(or v (error "invalid value: i386:value->accu: " v))
@ -264,7 +328,8 @@
(define (i386:value->accu-address+n n v)
(or v (error "invalid value: i386:value->accu-address+n: " v))
`(("mov____$i32,0x8(%eax)" (#:immediate1 ,n) (#:immediate ,v)))) ; movl $<v>,0x<n>(%eax)
`(,(if (< (abs v) #x80) `("mov____$i32,0x8(%eax)" (#:immediate1 ,n) (#:immediate ,v))
`("mov____$i32,0x32(%eax)" (#:immediate ,n) (#:immediate ,v)))))
(define (i386:base->accu-address)
'(("mov____%edx,%(eax)"))) ; mov %edx,(%eax)
@ -273,44 +338,27 @@
'(("mov____(%edx),%ecx") ; mov (%edx),%ecx
("mov____%ecx,%(eax)"))) ; mov %ecx,(%eax)
(define (i386:accu+n n)
`(("add____$i8,%eax" (#:immediate1 ,n)))) ; add $0x00,%eax
(define (i386:base+n n)
`(("add____$i8,%edx" (#:immediate1 ,n)))) ; add $0x00,%edx
(define (i386:byte-base->accu-address)
'(("mov____%dl,(%eax)"))) ; mov %dl,(%eax)
(define (i386:byte-base->accu-address+n n)
(or n (error "invalid value: byte-base->accu-address+n: " n))
`(("mov____%dl,0x8(%eax)" (#:immediate1 ,n)))) ; mov %dl,0x<n>(%eax)
`(,(if (< (abs n) #x80) `("mov____%dl,0x8(%eax)" (#:immediate1 ,n))
`("mov____%dl,0x32(%eax)" (#:immediate ,n)))))
(define (i386:value->base v)
(or v (error "invalid value: i386:value->base: " v))
`(("mov____$i32,%edx" (#:immediate ,v)))) ; mov $<v>,%edx
(define (i386:local-add n v)
(or n (error "invalid value: i386:local-add: " n))
`(("add____$i8,0x8(%ebp)" (#:immediate1 ,(- 0 (* 4 n))) (#:immediate1 ,v)))) ; addl $<v>,0x<n>(%ebp)
(define (i386:accu-mem-add v)
`(("add____$i8,0x8(%eax)" (#:immediate1 ,v)))) ; addl $<v>,(%eax)
`(,(if (< (abs v) #x80) `("add____$i8,(%eax)" (#:immediate1 ,v))
`("add____$i32,(%eax)" (#:immediate ,v)))))
(define (i386:value->label label v)
(or v (error "invalid value: value->label: " v))
`(("mov____$i32,0x32" (#:address ,label) ; movl $<v>,(<n>)
`(("mov____$i32,0x32" (#:address ,label)
(#:immediate ,v))))
(define (i386:value->local n v)
(or n (error "invalid value: value->local: " n))
`(("mov____$i32,0x8(%ebp)" (#:immediate1 ,(- 0 (* 4 n))) ; movl $<v>,0x<n>(%ebp)
(#:immediate ,v))))
(define (i386:local-test n v)
(or n (error "invalid value: local-test: " n))
`(("cmp____$i8,0x8(%ebp)" (#:immediate1 ,(- 0 (* 4 n))) (#:immediate1 ,v)))) ; cmpl $<v>,0x<n>(%ebp)
(define (i386:call-label label n)
`((call32 (#:offset ,label))
("add____$i8,%esp" (#:immediate1 ,(* n 4)))))
@ -335,7 +383,8 @@
("sahf"))) ; sahf
(define (i386:accu-cmp-value v)
`(("cmp____$i8,%eax" (#:immediate1 ,v)))) ; cmp $<v>,%eax
`(,(if (< (abs v) #x80) `("cmp____$i8,%eax" (#:immediate1 ,v))
`("cmp____$i32,%eax" (#:immediate ,v)))))
(define (i386:accu-test)
'(("test___%eax,%eax"))) ; test %eax,%eax

View file

@ -28,59 +28,56 @@
#:use-module (mes guile)
#:use-module (mes as)
#:export (
i386:accu-cmp-value
i386:accu%base
i386:accu*base
i386:accu+accu
i386:accu+base
i386:accu+value
i386:accu->base
i386:accu->base-address
i386:accu->base-address+n
i386:accu->label
i386:accu->local
i386:accu-mem-add
i386:accu-test
i386:accu-zero?
i386:accu+accu
i386:accu+base
i386:accu+value
i386:accu/base
i386:accu%base
i386:accu*base
i386:accu-base
i386:accu-shl
i386:accu-and-base
i386:accu-base
i386:accu-cmp-value
i386:accu-mem-add
i386:accu-negate
i386:accu-not
i386:accu-or-base
i386:accu-shl
i386:accu-test
i386:accu-xor-base
i386:accu-zero?
i386:accu/base
i386:accu<->stack
i386:accu<<base
i386:accu>>base
i386:base-sub
i386:base+value
i386:base->accu
i386:base->accu-address
i386:byte-accu->base-address
i386:base->label
i386:base->local
i386:base-address->accu-address
i386:base-mem+n->accu
i386:base-mem->accu
i386:byte-base-sub
i386:base-sub
i386:byte-accu->base-address
i386:byte-base->accu-address
i386:byte-base->accu-address+n
i386:byte-base-mem->accu
i386:local-address->accu
i386:byte-base-sub
i386:byte-local->accu
i386:byte-local->base
i386:byte-mem->accu
i386:base-mem+n->accu
i386:byte-mem->base
i386:byte-test-base
i386:byte-sub-base
i386:byte-test-base
i386:call-accu
i386:call-label
i386:formal
i386:function-locals
i386:function-preamble
i386:label-mem-add
i386:label->accu
i386:label->base
i386:label-mem->accu
i386:label-mem->base
i386:jump
i386:jump
i386:jump-byte-z
@ -88,29 +85,36 @@
i386:jump-ge
i386:jump-nz
i386:jump-z
i386:label->accu
i386:label->base
i386:label-mem->accu
i386:label-mem->base
i386:label-mem-add
i386:local->accu
i386:local->base
i386:local-add
i386:local-address->accu
i386:local-address->accu
i386:local-address->base
i386:local-ptr->accu
i386:local-ptr->base
i386:local-address->base
i386:local-test
i386:mem+n->accu
i386:mem->accu
i386:mem->base
i386:mem+n->accu
i386:nop
i386:nz->accu
i386:pop-accu
i386:push-accu
i386:pop-base
i386:push-accu
i386:push-base
i386:push-byte-local-de-de-ref
i386:push-byte-local-de-ref
i386:push-label
i386:push-label-mem
i386:push-local
i386:push-byte-local-de-ref
i386:push-byte-local-de-de-ref
i386:push-local-de-ref
i386:push-local-address
i386:push-local-de-ref
i386:ret
i386:ret-local
i386:sub-base
@ -118,17 +122,12 @@
i386:value->accu
i386:value->accu-address
i386:value->accu-address+n
i386:value->base
i386:value->label
i386:value->local
i386:value->base
i386:xor-accu
i386:xor-zf
i386:accu+n
i386:base+n
i386:base-address->accu-address
i386:nz->accu
i386:z->accu
i386:accu<->stack
))
(include-from-path "mes/as-i386.mes")

View file

@ -18,11 +18,20 @@
DEFINE add____$i32,%eax 05
DEFINE add____$i32,%ecx 81c1
DEFINE add____$i32,%edx 81c2
DEFINE add____$i32,(%eax) 8100
DEFINE add____$i32,0x32(%eax) 8180
DEFINE add____$i32,0x32(%ebp) 8185
DEFINE add____$i8,%eax 83c0
DEFINE add____$i8,%edx 83c2
DEFINE add____$i8,%esp 83c4
DEFINE add____$i8,(%eax) 8300
DEFINE add____$i8,0x32 8305
DEFINE add____$i8,0x8(%eax) 8300
DEFINE add____$i8,0x32(%eax) 8380
DEFINE add____$i8,0x32(%eax) 8380
DEFINE add____$i8,0x32(%ebp) 8385
DEFINE add____$i8,0x8(%eax) 8340
DEFINE add____$i8,0x8(%ebp) 8345
DEFINE add____%eax,%eax 01c0
DEFINE add____%ebp,%eax 01e8
@ -31,8 +40,13 @@ DEFINE add____%edx,%eax 01d0
DEFINE and____%edx,%eax 21d0
DEFINE call32 e8
DEFINE call___*%eax ffd0
DEFINE cmp____$0x32,%eax 3d
DEFINE cmp____$i32,%eax 3d
DEFINE cmp____$i32,0x32(%ebp) 81bd
DEFINE cmp____$i32,0x8(%ebp) 817d
DEFINE cmp____$i8,%eax 83f8
DEFINE cmp____$i8,0x8(%ebp) 83x7d
DEFINE cmp____$i8,0x32(%ebp) 83bd
DEFINE cmp____$i8,0x8(%ebp) 837d
DEFINE cmp____%al,%dl 38c2
DEFINE cmp____%edx,%eax 39d0
DEFINE div____%ebx f7f3
@ -44,11 +58,11 @@ DEFINE jmp32 e9
DEFINE jne32 0f85
DEFINE je8 74
DEFINE lahf 9f
DEFINE lea____0x32(%ebp),%eax 8d85
DEFINE lea____0x32(%ebp),%edx 8d95
DEFINE lea____0x8(%ebp),%eax 8d45
DEFINE lea____0x8(%ebp),%edx 8d55
DEFINE leave c9
DEFINE nop 90
DEFINE not____%eax f7d0
DEFINE mov____$i32,%eax b8
DEFINE mov____$i32,%ebx bb
DEFINE mov____$i32,%ecx b9
@ -57,27 +71,39 @@ DEFINE mov____$i32,(%eax) c700
DEFINE mov____$i32,0x32 c705
DEFINE mov____$i32,0x8(%eax) c740
DEFINE mov____$i32,0x8(%ebp) c745
DEFINE mov____%al,(%edx) 8802
DEFINE mov____%al,(%edx) 8802
DEFINE mov____%dl,(%eax) 8810
DEFINE mov____%dl,0x8(%eax) 8850
DEFINE mov____%eax,%ebx 89c3
DEFINE mov____%eax,%edx 89c2
DEFINE mov____%eax,(%edx) 8902
DEFINE mov____%eax,(%ecx) 8901
DEFINE mov____%eax,(%edx) 8902
DEFINE mov____%eax,0x32 a3
DEFINE mov____%eax,0x32(%ebp) 8985
DEFINE mov____%eax,0x32(%edx) 8982
DEFINE mov____%eax,0x8(%ebp) 8945
DEFINE mov____%eax,0x8(%edx) 8942
DEFINE mov____%eax,0x8(%edx) 8942
DEFINE mov____%ebp,%eax 89e8
DEFINE mov____%ebp,%ecx 89e9
DEFINE mov____%ebp,%edx 89ea
DEFINE mov____%ecx,%(eax) 8908
DEFINE mov____%edx,%(eax) 8910
DEFINE mov____%edx,%eax 89d0
DEFINE mov____%edx,%ebx 86d3
DEFINE mov____%edx,%ecx 89d1
DEFINE mov____%edx,0x32(%ebp) 8995
DEFINE mov____%edx,0x8(%ebp) 8955
DEFINE mov____%esp,%ebp 89e5
DEFINE mov____(%eax),%eax 8b00
DEFINE mov____(%edx),%edx 8b12
DEFINE mov____(%edx),%ecx 8b0a
DEFINE mov____(%edx),%edx 8b12
DEFINE mov____0x32(%eax),%eax 8b80
DEFINE mov____0x32(%ebp),%eax 8b85
DEFINE mov____0x32(%ebp),%eax 8b85
DEFINE mov____0x32(%ebp),%ebx 8b9d
DEFINE mov____0x32(%ebp),%ecx 8b8d
DEFINE mov____0x32(%ebp),%edx 8b95
DEFINE mov____0x32(%ebp),%edx 8b95
DEFINE mov____0x32,%eax a1
DEFINE mov____0x32,%edx 8b15
DEFINE mov____0x8(%eax),%eax 8b40
@ -86,19 +112,24 @@ DEFINE mov____0x8(%ebp),%ebx 8b5d
DEFINE mov____0x8(%ebp),%ecx 8b4d
DEFINE mov____0x8(%ebp),%edx 8b55
DEFINE movzbl_%al,%eax 0fb6c0
DEFINE movzbl_%dl,%edx 0fb6d2
DEFINE movzbl_(%eax),%eax 0fb600
DEFINE movzbl_(%eax),%edx 0fb610
DEFINE movzbl_(%edx),%edx 0fb612
DEFINE movzbl_0x8(%ebp),%eax 0fb645
DEFINE movzbl_0x8(%ebp),%edx 0fb655
DEFINE mul____%edx f7e2
DEFINE nop 90
DEFINE not____%eax f7d0
DEFINE or_____%edx,%eax 09d0
DEFINE pop____%eax 58
DEFINE pop____%edx 5a
DEFINE push___$i32 68
DEFINE push___%eax 50
DEFINE push___%ebp 55
DEFINE push___%edox 52
DEFINE push___%edx 52
DEFINE push___(%eax) ff30
DEFINE push___0x32(%ebp) ffb5
DEFINE push___0x8(%ebp) ff75
DEFINE ret c3
DEFINE sahf 9e
@ -126,6 +157,7 @@ DEFINE xor____%edx,%eax 31d0
DEFINE xor____%edx,%edx 31d2
DEFINE SYS_exit 01000000
DEFINE SYS_read 03000000
DEFINE SYS_write 04000000