Raymond Toy pushed to branch arm64-dev-1 at cmucl / cmucl
Commits:
-
dc770902
by Raymond Toy at 2026-03-25T17:53:45-07:00
-
99e299f9
by Raymond Toy at 2026-03-25T17:56:39-07:00
-
d599bf13
by Raymond Toy at 2026-03-25T17:56:55-07:00
-
b324b23c
by Raymond Toy at 2026-03-25T19:26:38-07:00
3 changed files:
Changes:
| ... | ... | @@ -1995,7 +1995,12 @@ |
| 1995 | 1995 | (emit-format-move-wide segment ,sf ,opc #b100101 hw src
|
| 1996 | 1996 | (reg-tn-encoding rd)))
|
| 1997 | 1997 | (fixup
|
| 1998 | - (note-fixup segment ,fixup-kind src)
|
|
| 1998 | + (let ((fixup-name (intern
|
|
| 1999 | + (symbolicate (symbol-name ,fixup-kind)
|
|
| 2000 | + (format nil "-~D" lsl))
|
|
| 2001 | + :keyword)))
|
|
| 2002 | + ;; Fixup names are like :movz-0, :movz-16, :movz-32, :movz-48.
|
|
| 2003 | + (note-fixup segment fixup-name src))
|
|
| 1999 | 2004 | (emit-format-move-wide segment ,sf ,opc #b100101 hw 0
|
| 2000 | 2005 | (reg-tn-encoding rd)))))))))
|
| 2001 | 2006 | (def movn 0 1 :movn) ; Move with NOT, 64-bit
|
| ... | ... | @@ -3815,7 +3820,7 @@ |
| 3815 | 3820 | (inst movk temp (ldb (byte 16 16) delta) :lsl 16)
|
| 3816 | 3821 | (inst movk temp (ldb (byte 16 32) delta) :lsl 32)
|
| 3817 | 3822 | (inst movk temp (ldb (byte 16 48) delta) :lsl 48)
|
| 3818 | - (inst add dst src temp)))))))
|
|
| 3823 | + (inst add dst src temp))))))
|
|
| 3819 | 3824 | |
| 3820 | 3825 | ;; code = fn - fn-ptr-type - header - label-offset + other-pointer-tag
|
| 3821 | 3826 | (define-instruction compute-code-from-fn (segment dst src label temp)
|
| ... | ... | @@ -3883,8 +3888,12 @@ |
| 3883 | 3888 | (unless (zerop hw2) (inst movk reg hw2 :lsl 32))
|
| 3884 | 3889 | (unless (zerop hw3) (inst movk reg hw3 :lsl 48))))))
|
| 3885 | 3890 | (fixup
|
| 3891 | + ;; Pass the fixup to each instruction -- movz/movk note the fixup
|
|
| 3892 | + ;; internally with the appropriate LSL-encoded name.
|
|
| 3886 | 3893 | (inst movz reg value)
|
| 3887 | - (inst movk reg value :lsl 16))))
|
|
| 3894 | + (inst movk reg value :lsl 16)
|
|
| 3895 | + (inst movk reg value :lsl 32)
|
|
| 3896 | + (inst movk reg value :lsl 48))))
|
|
| 3888 | 3897 | |
| 3889 | 3898 | (define-instruction-macro li (reg value)
|
| 3890 | 3899 | `(%li ,reg ,value))
|
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | ;;; ADRP + ADD + BR sequence (3 instructions = 12 bytes), rounded up to
|
| 46 | 46 | ;;; 16 bytes for alignment.
|
| 47 | 47 | (setf (c::backend-foreign-linkage-space-start *target-backend*)
|
| 48 | - #x0f800000
|
|
| 48 | + #x600000000000
|
|
| 49 | 49 | (c::backend-foreign-linkage-entry-size *target-backend*)
|
| 50 | 50 | 16)
|
| 51 | 51 | |
| ... | ... | @@ -245,14 +245,13 @@ |
| 245 | 245 | ;;; Where to put the different spaces. Must match the C code (arm64-validate.h)!
|
| 246 | 246 | ;;;
|
| 247 | 247 | ;;; AArch64 virtual address space is 48 bits (256 TiB) with the low
|
| 248 | -;;; half available to user-space processes. We place the Lisp spaces
|
|
| 249 | -;;; in the first gigabyte, mirroring the SPARC layout but noting that
|
|
| 250 | -;;; on AArch64 the upper 16 bits of a 64-bit address must match bit 47
|
|
| 248 | +;;; half available to user-space processes. Note that on AArch64 the
|
|
| 249 | +;;; upper 16 bits of a 64-bit address must match bit 47
|
|
| 251 | 250 | ;;; (tagged-address extension); user-space addresses are therefore in
|
| 252 | 251 | ;;; the range 0x0000_0000_0000_0000 – 0x0000_7FFF_FFFF_FFFF.
|
| 253 | -(defconstant target-read-only-space-start #x10000000)
|
|
| 254 | -(defconstant target-static-space-start #x28000000)
|
|
| 255 | -(defconstant target-dynamic-space-start #x40000000)
|
|
| 252 | +(defconstant target-read-only-space-start #x610000000000)
|
|
| 253 | +(defconstant target-static-space-start #x620000000000)
|
|
| 254 | +(defconstant target-dynamic-space-start #x630000000000)
|
|
| 256 | 255 | |
| 257 | 256 | (defconstant target-foreign-linkage-space-start
|
| 258 | 257 | (c:backend-foreign-linkage-space-start *target-backend*))
|
| ... | ... | @@ -236,7 +236,8 @@ |
| 236 | 236 | |
| 237 | 237 | ;; The foreign linkage space start and size
|
| 238 | 238 | |
| 239 | - (foreign-linkage-space-start 0 :type (unsigned-byte 32))
|
|
| 239 | + (foreign-linkage-space-start 0 :type (unsigned-byte #-arm64 32
|
|
| 240 | + #+arm64 64))
|
|
| 240 | 241 | (foreign-linkage-entry-size 0 :type index))
|
| 241 | 242 | |
| 242 | 243 |