Ignore:
Timestamp:
Dec 5, 2011, 10:25:20 PM (8 years ago)
Author:
gb
Message:

ARM-specific changes, mostly.

When running lisp code (in almost all cases), keep the constant 0.0d0
in the d7 register (and therefore 0.0s0 in s14 and s15). We use d7 as
a vector header when saving non-volatile FPRs on the stack; we
actually only modify s14, so we now restore s14 after it's been used
this way. The value used in the header in lisp and kernel code is
loaded from PC-relative memory, which means that we no longer use
fmsr/fmdrr or similar instructions.

When starting a lisp thread or entering one via a callback, initialize
d7.

This all basically means that we can get 0.0[d|s]0 into an FPR (or
exploit the fact that it's already in one) a bit easier, and that's
generally a good thing. It's an ABI change, which means that the
FASL and image versions (for the ARM port only) changed; new binaries
are included in this commit.

The kernel changes to support the use of d7 are mostly pretty obvious.
In working on them, I noticed that "local labels" and "macro labels"
were in the same namespace, and we were only avoiding conflicts by
accident. For 10 years or so. (I also noticed that GAS doesn't fully
support PC-relative operands, so did that by hand.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/m4macros.m4

    r14993 r15111  
    3838                define(`CNamesNeedUnderscores',`')
    3939                define(`LocalLabelPrefix',`L')
     40                define(`MacroLabelPrefix',`L__')
    4041                define(`StartTextLabel',`Ltext0')
    4142                define(`EndTextLabel',`Letext')
     
    5051               define(`HaveWeakSymbols',`')
    5152               define(`LocalLabelPrefix',`.L')
     53               define(`MacroLabelPrefix',`.L__')
    5254               define(`StartTextLabel',`.Ltext0')
    5355               define(`EndTextLabel',`.Letext')
     
    6062               define(`HaveWeakSymbols',`')
    6163               define(`LocalLabelPrefix',`.L')
     64               define(`MacroLabelPrefix',`.L__')
    6265               define(`StartTextLabel',`.Ltext0')
    6366               define(`EndTextLabel',`.Letext')'
     
    6972               define(`HaveWeakSymbols',`')
    7073               define(`LocalLabelPrefix',`.L')
     74               define(`MacroLabelPrefix',`.L__')
    7175               define(`StartTextLabel',`.Ltext0')
    7276               define(`EndTextLabel',`.Letext')')
     
    7579        ifdef(`WIN_32',`define(`CNamesNeedUnderscores',`')')
    7680               define(`LocalLabelPrefix',`L')
     81               define(`MacroLabelPrefix',`L__')
    7782               define(`StartTextLabel',`Ltext0')
    7883               define(`EndTextLabel',`Letext')')
     
    293298
    294299define(`_local_label',`LocalLabelPrefix()`'$1')
     300define(`_macro_label',`MacroLabelPrefix()`'$1')
    295301
    296302define(`local_label',`_local_label($1`'__local_label_counter__)')
    297303
    298 define(`macro_label',`_local_label($1`'__macro_label_counter__)')
     304define(`macro_label',`_macro_label($1`'__macro_label_counter__)')
    299305
    300306
Note: See TracChangeset for help on using the changeset viewer.