Commit graph

17 commits

Author SHA1 Message Date
Douglas Katzman 494e507e1d x86-64: Give multiple responsibilities to R12-TN
It is NULL-TN and the GC card table base register, and maybe the global
safepoint page pointer too. The card table and safepoint page are each
constant offsets from NIL.

Subsequent changes will allow relocating static space. In fact this change
does not relax the sub-2Gb constraint yet, because alien calls still use
a 32-bit signed immediate operand to refer to an absolute address thusly:
  FF14252803E07F   CALL [#x7FE00328] ; getpid

Tested on +/-{sb-thread,immobile-space,mark-region-gc,win32}
2025-04-10 21:08:29 -04:00
Stas Boukarev c5db421695 Revert "x86-64: Give multiple responsibilities to R12-TN"
This reverts commit 2922e25dd8.

Accidental push.
2025-04-10 03:18:09 +03:00
Douglas Katzman 2922e25dd8 x86-64: Give multiple responsibilities to R12-TN
It is NULL-TN and the GC card table base register, and maybe the global
safepoint page pointer too. The card table and safepoint page are each
constant offsets from NIL.

Subsequent changes will allow relocating static space. In fact this change
does not relax the sub-2Gb constraint yet, because alien calls still use
a 32-bit signed immediate operand to refer to an absolute address thusly:
  FF14252803E07F   CALL [#x7FE00328] ; getpid

Tested on +/-{sb-thread,immobile-space,mark-region-gc,win32}
2025-04-09 22:11:43 +03:00
Douglas Katzman a9bf87e202 Improve editcore and elftool
* Teach PREPARE-ELF to allow for more than one string and symbol
* Return a struct from parse-header instead of multiple values
* Rename linkage-space slots to ALIEN-LINKAGE-SPACE
  (anticpating subsequent addition of lisp-linkage-space)
2024-06-13 10:24:14 -04:00
Douglas Katzman 73091ccd20 mark-region: add minimal compact-instance-header feature
To get ths feature you have to add --with-permgen which is like an extension
of static space for layouts only. I plan to make the space relocatable and
potentially GCable after figuring out how much mutator performance loss
without compact-instance-header is due to greater memory consumption, and/or
whether it's worth the trouble to deal with mortality or lack thereof.
2023-12-31 17:31:32 -05:00
Douglas Katzman 5bb4cd748e Add missing case in sb-editcore::parse-core-header 2023-11-21 11:25:53 -05:00
Douglas Katzman c0909103ae Remove more brittleness from core space numbering
max-core-space-id is no longer the determiner of how many spaces to save,
it's just a bound on the max space id, exactly like it sounds.
2023-11-07 11:32:33 -05:00
Douglas Katzman 5a2e639a0d Rename os_validate to os_alloc_gc_space
Nobody I surveyed guessed correctly that "validate" meant "give me memory"
2022-09-17 09:43:07 -04:00
Douglas Katzman 6b5f65fddc Invent a GC space identifier for stack regions
and I don't know what "alignment passed from os_validate" means,
so rewrite that comment block.
2022-09-16 21:07:51 -04:00
Douglas Katzman 851cbd2b77 Rename LINKAGE-TABLE to ALIEN-LINKAGE-TABLE
Anticipating that FDEFNs can be subsumed by something other than 1st-class
objects, we'll need a unified space of lisp function pointers. I tried to pick
a non-conflicting name for such space, but "linkage table" really fits.
Therefore this change renames the existing table. It was FOREIGN-LINKAGE-TABLE
in CMUCL, but "ALIEN" requires fewer keystrokes and matches DEFINE-ALIEN.
2022-09-03 17:27:36 -04:00
Douglas Katzman b8ff0a4866 Pass a GC space identifier to os_validate
Let it figure out what to do for the particular arch/os and space.
So coreparse is clearer, and win32 doesn't need to expose validate_nocommit.
2022-08-11 12:19:15 -04:00
Douglas Katzman 894b122af7 Rename varyobj space to text space
because it becomes the ".text" section of an ELF core.
And rename free_pointer to highwatermark (like dynamic_space).
2022-07-30 16:12:23 -04:00
Charles Zhang 40c2ad71cd genesis: Create cold packages "on demand".
By creating packages on demand only for those symbols that actually
get loaded during genesis, we no longer create packages in the target
that aren't needed. This makes cross-compilation and cold loading
custom builds with stuff added or removed more flexible. It also
allows us to create packages normally without the extra indirection of
making package data objects in the future. This also centralizes the
creation of the packages COMMON-LISP, COMMON-LISP-USER, and KEYWORD,
allowing docstrings to be initialized all in one place.

We also define a cross compiler version of PACKAGE-NAME that returns
COMMON-LISP for the XC-STRICT-CL and SB-XC packages, since this could
potentially get confusing.
2022-06-04 00:44:33 -07:00
Stas Boukarev e75cc3cac1 Callbacks on darwin-arm64
Add a new core space, static-code-space, and store only callback
trampolines there.
2021-02-07 20:23:57 +03:00
Douglas Katzman 1bbee7a141 Define constant once only 2020-02-03 16:05:02 -05:00
Douglas Katzman c202648bbd Fix obvious typo.
Not technically wrong, but in Armed Bear Common Lisp 1.3.0
  CL-USER(1): (read-from-string "::foo") -> :|:FOO|
And so we got 'bad DEFPACKAGE option: (:|:USE| "CL")'
2018-03-05 18:25:07 -05:00
Douglas Katzman ea395cb6fb Share magic constants between genesis and editcore 2018-01-15 13:53:38 -05:00