* disp-code-data changed from 16 to 24 in order to allow for future

code annotations.
This commit is contained in:
Abdulaziz Ghuloum 2007-09-04 19:16:43 -04:00
parent a291ed8ffb
commit 50dcf3a11f
5 changed files with 17 additions and 5 deletions

Binary file not shown.

View File

@ -10,7 +10,7 @@
#define disp_code_code_size 4
#define disp_code_reloc_vector 8
#define disp_code_freevars 12
#define disp_code_data 16
#define disp_code_data 24
#define off_code_data (disp_code_data - code_pri_tag)
#define off_code_reloc_vector (disp_code_reloc_vector - code_pri_tag)

Binary file not shown.

View File

@ -1795,7 +1795,7 @@
(define disp-code-instrsize 4)
(define disp-code-relocsize 8)
(define disp-code-freevars 12)
(define disp-code-data 16)
(define disp-code-data 24)
(define port-tag #x3F)
(define output-port-tag #x7F)
@ -1828,6 +1828,10 @@
(define align-shift 3)
(define dirty-word -1))
(module ()
;;; initialize the cogen
(code-entry-adjustment (- disp-code-data vector-tag)))
(begin ;;; COGEN HELERS
(define (align n)
(fxsll (fxsra (fx+ n (fxsub1 object-alignment)) align-shift) align-shift))

View File

@ -1,7 +1,7 @@
(library (ikarus intel-assembler)
(export assemble-sources)
(export assemble-sources code-entry-adjustment)
(import
(ikarus)
(ikarus code-objects)
@ -908,6 +908,12 @@
[else (f (cdr ls))])))))
(define code-entry-adjustment
(let ([v #f])
(case-lambda
[() (or v (error 'code-entry-adjustment "uninitialized"))]
[(x) (set! v x)])))
(define whack-reloc
(lambda (thunk?-label code vec)
(define reloc-idx 0)
@ -957,7 +963,8 @@
(let ([loc (label-loc v)])
(let ([obj (car loc)] [disp (cadr loc)])
(vector-set! vec reloc-idx (fxlogor 2 (fxsll idx 2)))
(vector-set! vec (fx+ reloc-idx 1) (fx+ disp 11))
(vector-set! vec (fx+ reloc-idx 1)
(fx+ disp (code-entry-adjustment)))
(vector-set! vec (fx+ reloc-idx 2) obj)))
(set! reloc-idx (fx+ reloc-idx 3))]
[(local-relative)
@ -977,7 +984,8 @@
(error 'whack-reloc "invalid relative jump obj=~s disp=~s\n"
obj disp))
(vector-set! vec reloc-idx (fxlogor 3 (fxsll idx 2)))
(vector-set! vec (fx+ reloc-idx 1) (fx+ disp 11))
(vector-set! vec (fx+ reloc-idx 1)
(fx+ disp (code-entry-adjustment)))
(vector-set! vec (fx+ reloc-idx 2) obj)))
(set! reloc-idx (fx+ reloc-idx 3))]
[else (error 'whack-reloc "invalid reloc type ~s" type)]))