mescc: Remove jump calculation, use labels: remove offset-jumps.

* module/mes/as-i386.mes (i386:XXjump, i386:Xjump, i386:Xjump-c,
  i386:Xjump-cz, i386:Xjump-g, i386:Xjump-ge, i386:Xjump-l,
  i386:Xjump-le, i386:Xjump-nc, i386:Xjump-ncz, i386:Xjump-ncz",
  i386:Xjump-nz, i386:Xjump-z, i386:jump, i386:jump-byte-nz,
  i386:jump-byte-z, i386:jump-c, i386:jump-cz, i386:jump-le,
  i386:jump-nc, i386:jump-ncz, i386:jump-nz, i386:jump-z,
  i386:test-jump-z): Remove.
* module/mes/as-i386.scm: Remove export.
This commit is contained in:
Jan Nieuwenhuizen 2017-06-13 20:27:40 +02:00
parent bdd80babb8
commit 5bbcce7c67
2 changed files with 0 additions and 141 deletions

View file

@ -338,14 +338,6 @@
(define (i386:accu-test) (define (i386:accu-test)
'(#x85 #xc0)) ; test %eax,%eax '(#x85 #xc0)) ; test %eax,%eax
(define (i386:Xjump n)
(or n (error "invalid value: i386:Xjump: n: " n))
`(#xe9 ,@(int->bv32 (if (>= n 0) n (- n 5))))) ; jmp . + <n>
(define (i386:XXjump n)
(or n (error "invalid value: i386:XXjump: n: " n))
`(#xe9 ,@(int->bv32 n))) ; jmp . + <n>
(define (i386:jump-label label) (define (i386:jump-label label)
`(#xe9 ,label #f #f #f)) ; jmp . + <n> `(#xe9 ,label #f #f #f)) ; jmp . + <n>
@ -370,107 +362,6 @@
(define (i386:jump-label-z label) (define (i386:jump-label-z label)
`(#x0f #x84 ,label #f #f #f)) ; jz . + <n> `(#x0f #x84 ,label #f #f #f)) ; jz . + <n>
(define (i386:Xjump-nz n)
(or n (error "invalid value: i386:Xjump-nz: n: " n))
`(#x0f #x85 ,@(int->bv32 n))) ; jnz . + <n>
(define (i386:Xjump-z n)
(or n (error "invalid value: i386:Xjump-z: n: " n))
`(#x0f #x84 ,@(int->bv32 n))) ; jz . + <n>
(define (i386:jump n) ;;FIXME: NEED THIS WEIRDNESS for t.c
(when (or (> n #x80) (< n #x-80))
(error "JUMP n=" n))
`(#xeb ,(if (>= n 0) (- n 2) (- n 2)))) ; jmp <n>
(define (i386:jump-c n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP n=" n))
`(#x72 ,(if (>= n 0) n (- n 2)))) ; jc <n>
(define (i386:jump-cz n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP n=" n))
`(#x76 ,(if (>= n 0) n (- n 2)))) ; jbe <n>
(define (i386:jump-ncz n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-ncz n=" n))
`(#x77 ,(if (>= n 0) n (- n 2)))) ; ja <n>
(define (i386:jump-nc n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-nc n=" n))
`(#x73 ,(if (>= n 0) n (- n 2)))) ; jnc <n>
;; unsigned
(define (i386:Xjump-nc n)
(or n (error "invalid value i386:Xjump-nc: " n))
`(#x0f #x83 ,@(int->bv32 n))) ; jnc <n>
;; unsigned
(define (i386:Xjump-ncz n)
(or n (error "invalid value: i386:Xjump-ncz" n))
`(#x0f #x87 ,@(int->bv32 n))) ; ja <n>
;; unsigned
;; (define (i386:Xjump-c n)
;; (or n urg:Xjump-c)
;; `(#x0f #x82 ,@(int->bv32 n))) ; jc <n>
;; unsigned
;; (define (i386:Xjump-cz n)
;; (or n urg:Xjump-cz)
;; `(#x0f #x86 ,@(int->bv32 n))) ; jbe <n>
;; signed
(define (i386:Xjump-g n)
(or n (error "invalid value: i386:Xjump-g: " n))
`(#x0f #x8f ,@(int->bv32 n))) ; jg/jnle <n>
;; signed
(define (i386:Xjump-ge n)
(or n (error "invalid value: Xjump-ge: " n))
`(#x0f #x8d ,@(int->bv32 n))) ; jge/jnl <n>
;; ;; signed
;; (define (i386:Xjump-l n)
;; (or n urg:Xjump-l)
;; `(#x0f #x8c ,@(int->bv32 n))) ; jl/jnge <n>
;; ;; signed
;; (define (i386:Xjump-le n)
;; (or n urg:Xjump-le)
;; `(#x0f #x8e ,@(int->bv32 n))) ; jle/jgn <n>
(define (i386:jump-z n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-z n=" n))
`(#x74 ,(if (>= n 0) n (- n 2)))) ; jz <n>
(define (i386:jump-nz n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-nz n=" n))
`(#x75 ,(if (>= n 0) n (- n 2)))) ; jnz <n>
(define (i386:test-jump-z n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-z n=" n))
`(#x85 #xc0 ; test %eax,%eax
#x74 ,(if (>= n 0) n (- n 4)))) ; jz <n>
(define (i386:jump-byte-nz n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-byte-nz n=" n))
`(#x84 #xc0 ; test %al,%al
#x75 ,(if (>= n 0) n (- n 4)))) ; jne <n>
(define (i386:jump-byte-z n)
(when (or (> n #x80) (< n #x-80))
(error "JUMP-byte-z n=" n))
`(#x84 #xc0 ; test %al,%al
#x74 ,(if (>= n 0) n (- n 4)))) ; jne <n>
(define (i386:byte-test-base) (define (i386:byte-test-base)
`(#x38 #xc2)) ; cmp %al,%dl `(#x38 #xc2)) ; cmp %al,%dl

View file

@ -79,7 +79,6 @@
i386:label->base i386:label->base
i386:label-mem->accu i386:label-mem->accu
i386:label-mem->base i386:label-mem->base
i386:jump i386:jump
i386:jump-label i386:jump-label
i386:jump-label-byte-z i386:jump-label-byte-z
@ -87,16 +86,6 @@
i386:jump-label-ge i386:jump-label-ge
i386:jump-label-nz i386:jump-label-nz
i386:jump-label-z i386:jump-label-z
i386:jump-byte-nz
i386:jump-byte-z
i386:jump-c
i386:jump-cz
i386:jump-le
i386:jump-nc
i386:jump-ncz
i386:jump-nz
i386:jump-z
i386:local->accu i386:local->accu
i386:local->base i386:local->base
i386:local-add i386:local-add
@ -123,7 +112,6 @@
i386:ret-local i386:ret-local
i386:sub-base i386:sub-base
i386:test-base i386:test-base
i386:test-jump-z
i386:value->accu i386:value->accu
i386:value->accu-address i386:value->accu-address
i386:value->accu-address+n i386:value->accu-address+n
@ -132,29 +120,9 @@
i386:value->base i386:value->base
i386:xor-accu i386:xor-accu
i386:xor-zf i386:xor-zf
;; long jump
i386:Xjump
;;i386:Xjump-c
;;i386:Xjump-cz
i386:Xjump-nc
i386:Xjump-ncz
i386:Xjump-nz
i386:Xjump-z
i386:Xjump-g
i386:Xjump-ge
;; i386:Xjump-l
;; i386:Xjump-le
i386:XXjump
i386:accu+n i386:accu+n
i386:base+n i386:base+n
i386:base-address->accu-address i386:base-address->accu-address
i386:nz->accu i386:nz->accu
i386:z->accu i386:z->accu
i386:accu<->stack i386:accu<->stack