sbcl Log

Commit Date  
[81bb03] by Lutz Euler Lutz Euler

Fix disassembly of XCHG RAX, R8 on x86-64.

Also fix the corresponding 32- and 16-bit versions.

The three combinations of the XCHG instruction with these specific
register operands were wrongly disassembled as NOP as their encoding
uses the opcode #x90 (with a REX and possibly the #x66 prefix) which the
printer of the NOP instruction matches. (The 8-bit version was already
disassembled correctly as it uses a different opcode.)

Add a new instruction format and two new prefilters to the disassembler
and add a printer clause to the XCHG instruction definition to precisely
distinguish between occurrences of the #x90 opcode that are NOPs and
that are XCHGs.

Note that both #x48 #x90 (XCHG RAX, RAX) and #x66 #x90 (XCHG AX, AX)
continue to disassemble as NOP. This seems sensible as the processor
treats any instruction with opcode #x90 as a true NOP if it exchanges
RAX (or the lower 32 or 16 bits of it) with itself (this is explicitly
stated in the processor's manual), and as the assembler already
generates #x66 #x90 when asked for a two-byte NOP.

2014-02-08 17:48:35 Tree
[645161] by Lutz Euler Lutz Euler

Fix assembly of XCHG EAX, EAX on x86-64.

Don't emit the short (accumulator, reg) form of the XCHG instruction
for this combination of arguments as the result is #x90 which is a NOP.
Instead emit the long (reg, reg/mem) form so that the upper 32 bits of
RAX are cleared as specified.

2014-02-08 17:48:35 Tree
[0e6564] by Lutz Euler Lutz Euler

Small cleanups in src/compiler/x86[-64]/insts.lisp.

On both platforms, remove a redundant instruction format definition:
TWO-BYTES was defined twice, identically. (The repetition seems not
to have done any harm.)

Break overly long lines and, on x86-64, update a comment.

2014-02-08 17:48:35 Tree
[f7b0e7] by Douglas Katzman Douglas Katzman

Ensure that the fopcompiler signals a warning on undefined functions.

Made a new file for fopcompiler tests that shouldn't first be compiled.
Also moved the fasload-print test to a better location.

2014-02-07 23:54:45 Tree
[292e8b] by Douglas Katzman Douglas Katzman

Unbreak SB-COVER

2014-02-07 23:46:45 Tree
[142dc0] by Douglas Katzman Douglas Katzman

Improve LOGBITP of constant 2nd arg

2014-02-07 15:08:15 Tree
[0cab3e] by Douglas Katzman Douglas Katzman

Add double-width compare-and-exchange instructions for x86oid.

Also add a test for the CPUID instruction.

There are new private functions for the enlightened.
These could be used as the implementation of a publicized CAS
expander for something like
(CAS (car+cdr my-cons) ...) ; Don't do this (not implemented)
but I didn't think that "shoehorning" these into CAS was better
than just providing the functions.

2014-02-07 14:35:47 Tree
[feb31f] by Stas Boukarev Stas Boukarev

Stop COMMUTATIVE-ARG-SWAP from producing undumpable structures.

If the form produces an error such undumpable structures will prevent
the error message from being dumped into the FASL.

COMMUTATIVE-ARG-SWAP manages to do so by wrapping the non-constant
variable in (truly-the type), to facilitate type propagation.

Get rid of COMMUTATIVE-ARG-SWAP completely, introduce a new known
attribute, COMMUTATIVE, and let IR1-OPTIMIZE-COMBINATION to perform
argument swapping before applying any transforms and without
discarding any type derivation already performed on the combination.

Fixes lp#1276282.

2014-02-06 23:04:18 Tree
[9c5ffb] by Douglas Katzman Douglas Katzman

Make the newly-added 'on-error' optional in do-forms-from-info

This is the simplest possible change which arbitrarily deems
that errors should be reported as errors in LOAD.

2014-02-06 18:21:51 Tree
[5fb8a6] by Douglas Katzman Douglas Katzman

Avoid deprecated function in test for bug 881445

2014-02-05 20:38:57 Tree
[ec8e5e] by Douglas Katzman Douglas Katzman

Don't try to allocate huge vectors in a thread region.

This isn't an optimization so much as "why were we doing that?"

2014-02-05 18:11:49 Tree
[5ac3b3] by Douglas Katzman Douglas Katzman

Re-fix *reader-package* inside sharp-{plus,minus}

2014-02-05 17:52:34 Tree
[b352c1] by Douglas Katzman Douglas Katzman

Fix more pprinting glitches in backquoted vectors

2014-02-05 17:25:10 Tree
[c34949] by Douglas Katzman Douglas Katzman

Reject defstruct syntax having unclear intent.

2014-02-04 06:28:53 Tree
[99cc20] by Douglas Katzman Douglas Katzman

Improve x86-64 ALLOCATE-VECTOR- for constant lengths.

2014-02-04 05:28:15 Tree
[bb758c] by Douglas Katzman Douglas Katzman


2014-02-03 13:11:48 Tree
[3cadcb] by Douglas Katzman Douglas Katzman

Adjust boundary test in x86-64 ALLOCATION sequence.

2014-02-03 05:53:29 Tree
[a4a6ac] by Douglas Katzman Douglas Katzman


This is the patch proposed on sbcl-devel (ca. November 2013)
with alterations for 2 out of 3 concerns raised by Nikodemus.

Indeed users can not roll their own equivalent of the new macro
using just the new proclamation. It's confusing to expose the
feature, as it would mean introducing another thing like
and then explaining how compilation "times" a/k/a "situations" are
not quite the same as "now" and "eventually", and why 2N choices
exist for one concept. YAGNI/Occam's Razor come to mind.

Were a user to try something like
(eval-when (:load-toplevel) (proclaim '(always-bound x)))
it can not possibly have any unusual effect due to PROCLAIM being
an ordinary function, whereas eval-when :compile-toplevel of same
certainly means that X is right now always bound.
So only the new macro is documented, not its implementation.

Closes lp#1253688

2014-02-03 05:29:12 Tree
[906982] by Douglas Katzman Douglas Katzman

CURRENT-THREAD-OFFSET-SAP, take 2, now with less magic.

2014-02-03 02:54:58 Tree
[a42d98] by Douglas Katzman Douglas Katzman

Remove ASSIGN-SETF-MACRO's secondary test for fboundness of SETF fun.

The new code is behaviorally different in a subtle way. The old didn't
didn't warn if a setf function was defined earlier in the same file
unless in eval-when :compile-toplevel. Whereas if (SETF F) had come
from a previously loaded file, you did get a style-warning upon
definition of the macro. Now either way style-warns.

There is no change in the signaling of a full warning if the compiler
has *assumed* a setf function to exist when the macroish setter is
defined, because that suggests something was compiled wrong.

This is almost but not entirely like the patch I proposed on sbcl-devel.
The unanticipated problems were mainly during xc because :where-from
changes what it reports for a function name that has no binding.
This might possibly warn about a few things in xc that it didn't before.

2014-02-03 01:18:40 Tree
[6aed5d] by Douglas Katzman Douglas Katzman

Placate Darwin C compiler with an explicit function prototype.

2014-02-02 23:24:57 Tree
[9dd7b1] by Douglas Katzman Douglas Katzman

Teach monitor's 'dump' command about 8-byte words.

2014-02-02 23:22:42 Tree
[ca5da6] by Lutz Euler Lutz Euler

Fix offsets of source tracking hooks in the disassembler.

The disassembler by default annotates code compiled under a sufficiently
high DEBUG optimization quality with source code fragments. This was
mostly broken: these annotations were being printed in the wrong place
(many lines too far into the output) or not at all.

The reason for this behaviour was that ADD-SOURCE-TRACKING-HOOKS
calculated the annotation's offsets relative to the start of the
instructions in the code component and passed them unchanged to the
hooks used to print the annotations, which expect them to be relative
to the start of the segment.

Fix this by adding code in ADD-SOURCE-TRACKING-HOOKS to convert the
offsets appropriately.

This bug seems to have been inherited already from CMUCL and it only
attracted attention when a change to the handling of prefix instructions
added a new failure mode to the existing ones, namely source annotations
breaking up disassembly lines inmidst the instruction bytes. See
lp#1249205 for details.

Fixes lp#1249205.

2014-02-02 15:36:03 Tree
[2670e9] by Douglas Katzman Douglas Katzman

Errors in (LOAD "f.lisp") should report as coming from LOAD, not COMPILE-FILE

Discussed on sbcl-devel

2014-02-01 21:23:37 Tree
[27e0b8] by Douglas Katzman Douglas Katzman

Don't style-warn when lexically binding an earmuffed uninterned symbol.

This also allows such symbols as defconstants fwiw.

2014-02-01 18:32:41 Tree
Older >