- Timestamp:
- Jul 14, 2010, 5:24:29 PM (14 years ago)
- Location:
- branches/arm
- Files:
-
- 18 edited
-
compiler/ARM/arm-arch.lisp (modified) (1 diff)
-
compiler/ARM/arm-backend.lisp (modified) (2 diffs)
-
compiler/ARM/arm-vinsns.lisp (modified) (1 diff)
-
level-0/ARM/arm-utils.lisp (modified) (9 diffs)
-
level-1/arm-threads-utils.lisp (modified) (3 diffs)
-
level-1/l1-io.lisp (modified) (1 diff)
-
level-1/l1-lisp-threads.lisp (modified) (2 diffs)
-
lib/arm-backtrace.lisp (modified) (2 diffs)
-
lib/backtrace.lisp (modified) (1 diff)
-
lib/edit-callers.lisp (modified) (2 diffs)
-
lib/nfcomp.lisp (modified) (1 diff)
-
lisp-kernel/area.h (modified) (2 diffs)
-
lisp-kernel/arm-asmutils.s (modified) (2 diffs)
-
lisp-kernel/arm-exceptions.c (modified) (1 diff)
-
lisp-kernel/arm-gc.c (modified) (1 diff)
-
lisp-kernel/arm-subprims.s (modified) (1 diff)
-
lisp-kernel/platform-linuxarm.h (modified) (1 diff)
-
xdump/xarmfasload.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/arm/compiler/ARM/arm-arch.lisp
r13948 r13962 1383 1383 (defconstant *function-initial-entrypoint* (ash *arm-subprims-base* (- arm::fixnumshift))) 1384 1384 1385 1385 ;;; These are always stack-allocated, "near" where the missing lisp frame 1386 ;;; that they represent would be. 1387 1388 (define-storage-layout fake-stack-frame 0 1389 header 1390 type ; 'arm::fake-stack-frame 1391 sp 1392 next-sp 1393 fn 1394 lr 1395 vsp 1396 xp) 1397 1398 1399 1386 1400 (provide "ARM-ARCH") -
branches/arm/compiler/ARM/arm-backend.lisp
r13897 r13962 17 17 18 18 (in-package "CCL") 19 20 (eval-when (:compile-toplevel :load-toplevel :execute) 21 (require "NXENV") 22 (require "ARMENV")) 19 23 20 24 (next-nx-defops) … … 314 318 (pushnew *arm-backend* *known-backends* :key #'backend-name) 315 319 320 321 (defmacro with-fake-stack-frame ((var sp next-sp fn lr vsp xp) &body body) 322 `(let* ((,var (ccl::%istruct 'arm::fake-stack-frame ,sp ,next-sp ,fn ,lr ,vsp ,xp))) 323 (declare (dynamic-extent ,var) (ignorable ,var)) 324 ,@body)) 325 316 326 (require "ARM-VINSNS") 317 327 -
branches/arm/compiler/ARM/arm-vinsns.lisp
r13955 r13962 2183 2183 (cmp src (:$ 0)) 2184 2184 (mov temp (:$ arm::subtag-bignum)) 2185 (movgt size (:$ (- (* 2arm::dnode-size) arm::fulltag-misc)))2186 (orrgt temp temp (:$ (ash 2arm::num-subtag-bits)))2187 (movlt size (:$ (- (* 1arm::dnode-size) arm::fulltag-misc)))2188 (orrlt temp temp (:$ (ash 1arm::num-subtag-bits)))2185 (movgt size (:$ (- (* 1 arm::dnode-size) arm::fulltag-misc))) 2186 (orrgt temp temp (:$ (ash 1 arm::num-subtag-bits))) 2187 (movlt size (:$ (- (* 2 arm::dnode-size) arm::fulltag-misc))) 2188 (orrlt temp temp (:$ (ash 2 arm::num-subtag-bits))) 2189 2189 (sub allocptr allocptr size) 2190 2190 (ldr result (:@ rcontext (:$ arm::tcr.save-allocbase))) -
branches/arm/level-0/ARM/arm-utils.lisp
r13927 r13962 332 332 (ba .SPnvalret)) 333 333 334 #+notyet ;trap encoding335 (progn336 337 334 338 335 … … 343 340 of sense to be turning the EGC on and off from multiple threads ..." 344 341 (check-nargs 1) 345 (sub i imm1 argnil)346 ( li imm0 arch::gc-trap-function-egc-control)347 ( trlgei allocptr 0)342 (sub imm1 arg 'nil) 343 (mov imm0 (:$ arch::gc-trap-function-egc-control)) 344 (uuo-gc-trap (:? al)) 348 345 (bx lr)) 349 346 … … 354 351 (e2size arg_z)) 355 352 (check-nargs 3) 356 ( li imm0 arch::gc-trap-function-configure-egc)357 ( trlgei allocptr 0)353 (mov imm0 (:$ arch::gc-trap-function-configure-egc)) 354 (uuo-gc-trap (:? al)) 358 355 (bx lr)) 359 356 360 357 (defarmlapfunction purify () 361 ( li imm0 arch::gc-trap-function-purify)362 ( trlgei allocptr 0)363 ( li arg_znil)358 (mov imm0 (:$ arch::gc-trap-function-purify)) 359 (uuo-gc-trap (:? al)) 360 (mov arg_z 'nil) 364 361 (bx lr)) 365 362 366 363 367 364 (defarmlapfunction impurify () 368 ( li imm0 arch::gc-trap-function-impurify)369 ( trlgei allocptr 0)370 ( li arg_znil)365 (mov imm0 (:$ arch::gc-trap-function-impurify)) 366 (uuo-gc-trap (:? al)) 367 (mov arg_z 'nil) 371 368 (bx lr)) 372 369 … … 375 372 of free space to leave in the heap after full GC." 376 373 (check-nargs 0) 377 (li imm0 arch::gc-trap-function-get-lisp-heap-threshold) 378 (trlgei allocptr 0) 379 #+arm32-target 380 (ba .SPmakeu32) 381 #+arm64-target 382 (ba .SPmakeu64)) 374 (mov imm0 (:$ arch::gc-trap-function-get-lisp-heap-threshold)) 375 (uuo-gc-trap (:? al)) 376 (ba .SPmakeu32)) 383 377 384 378 (defarmlapfunction set-lisp-heap-gc-threshold ((new arg_z)) … … 388 382 be somewhat larger than what was specified)." 389 383 (check-nargs 1) 390 (mflr loc-pc) 391 #+arm32-target 392 (bla .SPgetu32) 393 #+arm64-target 394 (bla .SPgetu64) 395 (mtlr loc-pc) 384 (build-lisp-frame) 385 (bl .SPgetu32) 396 386 (mov imm1 imm0) 397 (li imm0 arch::gc-trap-function-set-lisp-heap-threshold) 398 (trlgei allocptr 0) 399 #+arm32-target 400 (ba .SPmakeu32) 401 #+arm64-target 402 (ba .SPmakeu64)) 387 (mov imm0 (:$ arch::gc-trap-function-set-lisp-heap-threshold)) 388 (uuo-gc-trap (:? al)) 389 (restore-lisp-frame imm1) 390 (ba .SPmakeu32)) 403 391 404 392 … … 406 394 "Try to grow or shrink lisp's heap space, so that the free space is(approximately) equal to the current heap threshold. Return NIL" 407 395 (check-nargs 0) 408 ( li imm0 arch::gc-trap-function-use-lisp-heap-threshold)409 ( trlgei allocptr 0)410 ( li arg_znil)396 (mov imm0 (:$ arch::gc-trap-function-use-lisp-heap-threshold)) 397 (uuo-gc-trap (:? al)) 398 (mov arg_z 'nil) 411 399 (bx lr)) 412 400 … … 415 403 "Do a full GC, then consider all heap-allocated objects which survive to be non-relocatable." 416 404 (check-nargs 0) 417 (li imm0 arch::gc-trap-function-freeze) 418 (trlgei allocptr 0) 419 #+64-bit-target 420 (ba .SPmakeu64) 421 #+32-bit-target 405 (mov imm0 (:$ arch::gc-trap-function-freeze)) 406 (uuo-gc-trap (:? al)) 422 407 (ba .SPmakeu32)) 423 408 … … 425 410 "Like FREEZE, but don't GC first." 426 411 (check-nargs 0) 427 (li imm0 arch::gc-trap-function-flash-freeze) 428 (trlgei allocptr 0) 429 #+64-bit-target 430 (ba .SPmakeu64) 431 #+32-bit-target 412 (mov imm0 (:$ arch::gc-trap-function-flash-freeze)) 413 (uuo-gc-trap (:? al)) 432 414 (ba .SPmakeu32)) 433 415 … … 444 426 (defarmlapfunction %ensure-static-conses () 445 427 (check-nargs 0) 446 ( li imm0 arch::gc-trap-function-ensure-static-conses)447 ( trlgei allocptr 0)448 ( li arg_znil)449 (bx lr)) 450 ) 428 (mov imm0 (:$ arch::gc-trap-function-ensure-static-conses)) 429 (uuo-gc-trap (:? al)) 430 (mov arg_z 'nil) 431 (bx lr)) 432 451 433 452 434 ;;; offset is a fixnum, one of the arm::kernel-import-xxx constants. -
branches/arm/level-1/arm-threads-utils.lisp
r13918 r13962 19 19 (defun %frame-backlink (p &optional context) 20 20 (cond ((fake-stack-frame-p p) 21 (%f ake-stack-frame.next-spp))21 (%fixnum-ref p arm::fake-stack-frame.next-sp)) 22 22 ((fixnump p) (%%frame-backlink p)) 23 23 (t (error "~s is not a valid stack frame" p)))) … … 31 31 32 32 (defun fake-stack-frame-p (x) 33 nil) 33 (and (typep x 'fixnum) 34 (evenp x) 35 (eql (%fixnum-ref-natural x) 36 (logior (ash (ash (- arm::fake-stack-frame.size arm::node-size) 37 (- arm::word-shift)) 38 arm::num-subtag-bits) 39 arm::subtag-istruct)) 40 (eq (%fixnum-ref-natural x arm::node-size) 41 'arm::fake-stack-frame))) 42 34 43 35 44 (defun bottom-of-stack-p (p context) … … 92 101 (on-any-vstack x)) 93 102 (t 94 (on-any- tsp-stack x)))103 (on-any-csp-stack x))) 95 104 (%heap-ivector-p x))))))))) 96 105 -
branches/arm/level-1/l1-io.lisp
r13067 r13962 1600 1600 (defun %macptr-allocation-string (macptr) 1601 1601 (if (or (on-any-csp-stack macptr) 1602 #-arm-target 1602 1603 (on-any-tsp-stack macptr)) 1603 1604 "[stack-allocated]" -
branches/arm/level-1/l1-lisp-threads.lisp
r13889 r13962 703 703 (return t)))) 704 704 705 705 #-arm-target 706 706 (defun on-any-tsp-stack (object) 707 707 (or (%on-tsp-stack (%current-tcr) object) … … 720 720 (and (consp x) 721 721 (not (null (or (on-any-vstack x) 722 (on-any-tsp-stack x)))))) 722 #-arm-target 723 (on-any-tsp-stack x) 724 #+arm-target 725 (on-any-csp-stack x)))))) 723 726 724 727 -
branches/arm/lib/arm-backtrace.lisp
r13922 r13962 51 51 (defun index->address (p) 52 52 (when (fake-stack-frame-p p) 53 (setq p (%f ake-stack-frame.spp)))53 (setq p (%fixnum-ref p arm::fake-stack-frame.sp))) 54 54 (ldb (byte 32 0) (ash p arm::fixnumshift))) 55 55 … … 114 114 (defun %frame-savevsp (p) 115 115 (if (fake-stack-frame-p p) 116 (%f ake-stack-frame.vspp)116 (%fixnum-ref p arm::fake-stack-frame.vsp) 117 117 (%%frame-savevsp p))) -
branches/arm/lib/backtrace.lisp
r13910 r13962 42 42 nil ;; condition - not used 43 43 frame-ptr ;; current 44 #+ (or ppc-target arm-target)*fake-stack-frames*45 #+ x86-targetframe-ptr44 #+ppc-target *fake-stack-frames* 45 #+(or x86-target arm-target) frame-ptr 46 46 (%fixnum-ref tcr target::tcr.db-link) 47 47 0 ;; break level - not used -
branches/arm/lib/edit-callers.lisp
r13779 r13962 226 226 (defun %map-lfimms (function-object f) 227 227 (let* ((lfv (function-to-function-vector function-object)) 228 (n (- (uvsize lfv) #+arm-target 3 #-arm-target2)))228 (n (- (uvsize lfv) 2))) 229 229 (declare (fixnum n)) 230 230 #+ppc-target … … 238 238 #+arm-target 239 239 (do* ((i 2 (1+ i))) 240 (( = i n))240 ((>= i n)) 241 241 (declare (fixnum i)) 242 (funcall f ( %svref lfv i)))242 (funcall f (uvref lfv i))) 243 243 )) 244 244 -
branches/arm/lib/nfcomp.lisp
r13912 r13962 1207 1207 (#.target::tag-fixnum 1208 1208 (fasl-scan-fixnum exp)) 1209 (#.target:: fulltag-cons(fasl-scan-list exp))1209 (#.target::tag-list (fasl-scan-list exp)) 1210 1210 #+ppc32-target 1211 1211 (#.ppc32::tag-imm) -
branches/arm/lisp-kernel/area.h
r13789 r13962 154 154 #else 155 155 #ifdef ARM 156 #define PURESPACE_RESERVE ( 8<<20)157 #define PURESPACE_SIZE ( 4<<20)156 #define PURESPACE_RESERVE (64<<20) 157 #define PURESPACE_SIZE (32<<20) 158 158 #else 159 159 #define PURESPACE_RESERVE (128<<20) /* MB */ … … 162 162 #endif 163 163 164 #define STATIC_RESERVE heap_segment_size164 #define STATIC_RESERVE (1<<12) 165 165 166 166 -
branches/arm/lisp-kernel/arm-asmutils.s
r13958 r13962 24 24 /* Force data from r0 to r1 into the icache */ 25 25 _exportfn(C(flush_cache_lines)) 26 __ifdef(`LINUX') 26 27 __(mov r2,#0) /* options. Pass as 0 until we know better */ 27 28 __(mov r12,r7) /* preserve r7 ; r12 saved by syscall */ … … 30 31 __(svc #0) 31 32 __(mov r7,r12) 33 __endif 32 34 __(bx lr) 33 35 -
branches/arm/lisp-kernel/arm-exceptions.c
r13958 r13962 816 816 /* Based on experiments with a small sample size; need to R TFM. */ 817 817 return ((xp->uc_mcontext.trap_no == 0xe) && 818 (xp->uc_mcontext.error_code == 0x81 7));818 (xp->uc_mcontext.error_code == 0x81f)); 819 819 #endif 820 820 } -
branches/arm/lisp-kernel/arm-gc.c
r13948 r13962 1668 1668 } 1669 1669 start++; 1670 copy_ivector_reference(start, low, high, to); 1670 if (header_subtag(header) == subtag_function) { 1671 LispObj entrypt = *start; 1672 if ((entrypt > (LispObj)low) && 1673 (entrypt < (LispObj)high) && 1674 (fulltag_of(entrypt) == fulltag_odd_fixnum)) { 1675 *start = untag(entrypt) + fulltag_misc; 1676 copy_ivector_reference(start, low, high, to); 1677 *start = untag(*start)+fulltag_odd_fixnum; 1678 } else { 1679 copy_ivector_reference(start, low, high, to); 1680 } 1681 } else { 1682 copy_ivector_reference(start, low, high, to); 1683 } 1671 1684 start++; 1672 1685 } -
branches/arm/lisp-kernel/arm-subprims.s
r13893 r13962 54 54 55 55 56 /* This gets called with R 3pointing to the current TCR. */57 /* r 4is 0 if we want to start the whole thing rolling, */56 /* This gets called with R0 pointing to the current TCR. */ 57 /* r1 is 0 if we want to start the whole thing rolling, */ 58 58 /* non-zero if we want to reset the current process */ 59 59 /* by throwing to toplevel */ -
branches/arm/lisp-kernel/platform-linuxarm.h
r13948 r13962 26 26 27 27 28 #define MAXIMUM_MAPPABLE_MEMORY ( 256<<20) /* uh, no */29 #define IMAGE_BASE_ADDRESS 0x 0400100028 #define MAXIMUM_MAPPABLE_MEMORY (5<<28) 29 #define IMAGE_BASE_ADDRESS 0x50000000 30 30 31 31 #include "lisptypes.h" -
branches/arm/xdump/xarmfasload.lisp
r13948 r13962 87 87 :subdirs '("ccl:level-0;ARM;") 88 88 :compiler-target-name :linuxarm 89 :image-base-address (+ (- arm::nil-value arm::fulltag-nil) (ash 1 12))89 :image-base-address #x50000000 90 90 :nil-relative-symbols arm::*arm-nil-relative-symbols* 91 91 :static-space-init-function 'arm-initialize-static-space 92 :purespace-reserve (ash 820)92 :purespace-reserve (ash 64 20) 93 93 :static-space-address (- (- arm::nil-value arm::fulltag-nil) (ash 1 12)) 94 94 ))
Note:
See TracChangeset
for help on using the changeset viewer.
