Skip to content

Instantly share code, notes, and snippets.

diff -urN gcc-4.1.2-orig/gcc/config/i386/i386.c gcc-4.1.2/gcc/config/i386/i386.c
--- gcc-4.1.2-orig/gcc/config/i386/i386.c 2006-11-17 07:01:22.000000000 +0000
+++ gcc-4.1.2/gcc/config/i386/i386.c 2007-09-05 13:16:36.950573962 +0100
@@ -5313,7 +5313,7 @@
if (XINT (op, 1) == UNSPEC_TP
&& TARGET_TLS_DIRECT_SEG_REFS
&& seg == SEG_DEFAULT)
- seg = TARGET_64BIT ? SEG_FS : SEG_GS;
+ seg = (TARGET_64BIT && !TARGET_TLS_USE_GS) ? SEG_FS : SEG_GS;
else
(loop
for state = (ahci-port-register ahci port +ahci-register-PxIS+)
when (not (zerop state))
do (setf (ahci-port-register ahci port +ahci-register-PxIS+) state)
(return))
(defun make-dma-buffer (length &key persistent contiguous 32-bit element-type cache-mode)
"Allocate a new DMA buffer of the given length.
PERSISTENT - If true, the memory will be saved by a snapshot, though the
physical addresses may change between boots.
CONTIGUOUS - Allocate physical memory in a single contiguous chunk. The
resulting DMA buffer will have exactly one scatter/gather entry.
Allocation may fail and signal an error even if there is
sufficient memory, as it might not be contiguous.
32-BIT - If true, all allocated physical memory will be below the 32-bit
boundary.
Error Type error. NIL is not of type #<Structure-Class MEZZANO.DRIVER.USB.OHCI::ENDPOINT 1AA8AA9>..
208002AFF5A0 8001E6DA1C BACKTRACE
208002AFF610 8002AD8FFE (LAMBDA :IN (LAMBDA :IN MEZZANO.DRIVER.USB.THREADS::WORKER-THREAD-MAIN))
208002AFF660 8001E3A3A7 %HANDLER-BIND
208002AFF700 8002B08461 (LAMBDA :IN MEZZANO.DRIVER.USB.THREADS::WORKER-THREAD-MAIN)
208002AFF790 8001E39C42 SIGNAL
208002AFF830 8001E4A9F5 ERROR
208002AFF910 8001E52F13 RAISE-TYPE-ERROR
208002AFF930 4341EC %STRUCT-SLOT
208002AFF970 8002B4E856 (FLET MEZZANO.SUPERVISOR::DX-LAMBDA :IN (LAMBDA :IN (DEFMETHOD MEZZANO.DRIVER.USB:HANDLE-INTERRUPT-EVENT ((EQL :WRITEBACK-DONE) MEZZANO.DRIVER.USB.OHCI::OHCI T))))
;;;; WAIT-FOR-OBJECTS. Wait for events on multiple objects.
(defun wait-for-objects (&rest objects)
"Wait for any object in OBJECTS to be ready.
Returns a list of objects that are ready.
If no objects are supplied, then W-F-O will wait forever."
...)
(defun wait-for-objects-with-timeout (timeout &rest objects)
"As with WAIT-FOR-OBJECTS, but with a timeout.
#+mezzano
(progn
(rt:disable-note :nil-vectors-are-strings)
;; ARRAY-RANK-LIMIT is really large, this tends to exhaust memory.
(rt:rem-test 'cl-test::make-array.23)
;; Blows the stack.
(rt:rem-test 'cl-test::make-array.28)
;; Circular printing doesn't work.
(rt:rem-test 'cl-test::print.cons.7)
(let* ((obj (make-instance 'standard-object))
(test (list obj)))
(format t "~:S~%" test)
(setf test (remove obj test))
(format t "~:S~%" test))
;; Prints
;; (#<Standard-Object 4000046F3069>)
;; ()
;; Getting the input to perform-target-lap-generation:
(let ((fn (mezzano.compiler.backend.ast-convert:convert
(sys.c::compile-lambda-1 '(lambda ()))))
(target (sys.c::canonicalize-target :x86-64)))
(mezzano.compiler.backend::compile-backend-function-1 fn target)
(mezzano.compiler.backend.register-allocator::allocate-registers fn target)
(mezzano.compiler.backend::print-function fn))
;; =>
#<MEZZANO.COMPILER.BACKEND:BACKEND-FUNCTION {100F707853}>
(:ARGUMENT-SETUP #<MEZZANO.COMPILER.BACKEND:VIRTUAL-REGISTER :FREF :VALUE {100F707F93}> :RBX #<MEZZANO.COMPILER.BACKEND:VIRTUAL-REGISTER :COUNT :VALUE {100F707FF3}> NIL NIL NIL)
$ cat test.s
b foo
b foo
b foo
b foo
foo:
b foo
b foo
b foo
b foo
Welcome to the VirtualBox Debugger!
Current VM is 6ace2000, CPU #0
VBoxDbg> rt
info: Verbose register info.
VBoxDbg> r
rax=000000000081cac0 rbx=0000000000000400 rcx=0000000000000000 rdx=0000000000000000
rsi=0000000038530bc0 rdi=0000000000000002 r8 =0000000000400009 r9 =000000000081caf9
r10=0000000000406799 r11=000000000199dc49 r12=0000000000400009 r13=000000000041c079
r14=0000000000000000 r15=0000000000000000 iopl=0 nv up ei pl nz na pe nc
rip=000000000041c00e rsp=000020000121ff70 rbp=000020000121ff70