jne i386_initialize_no_fp
')
OP(inc,l) REG(eax) # 387 available
- OP(sub,l) TW(IMM(4),REG(esp))
- fclex
- fnstcw WOF(-2,REG(ebp))
- OP(and,w) TW(IMM(HEX(f0e0)),WOF(-2,REG(ebp)))
- OP(or,w) TW(IMM(FP_CONTROL_WORD),WOF(-2,REG(ebp)))
- fldcw WOF(-2,REG(ebp))
i386_initialize_no_fp:
')
OP(mov,l) TW(REG(eax),ABS(EVR(i387_presence)))
DECLARE_CODE_SEGMENT()
declare_alignment(2)
-define_c_label(x86_64_interface_initialize)
- OP(push,q) REG(rbp)
- OP(mov,q) TW(REG(rsp),REG(rbp))
- OP(sub,q) TW(IMM(8),REG(rsp))
- stmxcsr IND(REG(rsp))
- # Clear 7 (invalid operation mask)
- # 8 (denormalized operand mask)
- # 9 (zero-divide exception mask)
- # 10 (overflow exception mask)
- # 11 (underflow exception mask)
- # 15 (flush-to-zero (if set, gives non-IEEE semantics))
- OP(and,l) TW(IMM(HEX(ffff707f)),IND(REG(rsp)))
- # Set 12 (precision exception mask)
- OP(or,l) TW(IMM(HEX(1000)),IND(REG(rsp)))
- ldmxcsr IND(REG(rsp))
- leave
- ret
-
# Call a function (rdi) with an argument (rsi) and a stack pointer and
# frame pointer from inside C. When it returns, restore the original
# stack pointer. This kludge is necessary for operating system
int offset = (COMPILER_REGBLOCK_N_FIXED * (sizeof (SCHEME_OBJECT)));
unsigned char * rsi_value = ((unsigned char *) Registers);
- x86_64_interface_initialize ();
-
/* These must match machines/x86-64/lapgen.scm */
SETUP_REGISTER (asm_scheme_to_interface); /* 0 */
(lambda ()
(call-with-current-continuation
(lambda (continuation)
- ;; GC cannot be allowed before the fixed-objects-vector
- ;; is reset after restoring.
- (with-absolutely-no-interrupts
- (lambda ()
- (let ((fixed-objects (get-fixed-objects-vector)))
- ((ucode-primitive call-with-current-continuation)
- (lambda (restart)
- (with-interrupt-mask interrupt-mask/gc-ok
- (lambda (interrupt-mask)
- interrupt-mask
- (gc-flip)
- (do ()
- (((ucode-primitive dump-band) restart filename))
- (with-simple-restart 'RETRY "Try again."
- (lambda ()
- (error "Disk save failed:" filename))))
- (continuation
- (lambda ()
- (set! time-world-saved time)
- (if (string? id) unspecific #f)))))))
- ((ucode-primitive set-fixed-objects-vector!) fixed-objects))))
- (read-microcode-tables!)
+ (let ((float-env (flo:environment)))
+ ;; GC cannot be allowed before the fixed-objects-vector
+ ;; is reset after restoring.
+ (with-absolutely-no-interrupts
+ (lambda ()
+ (let ((fixed-objects (get-fixed-objects-vector)))
+ ((ucode-primitive call-with-current-continuation)
+ (lambda (restart)
+ (with-interrupt-mask interrupt-mask/gc-ok
+ (lambda (interrupt-mask)
+ interrupt-mask
+ (gc-flip)
+ (do ()
+ (((ucode-primitive dump-band) restart filename))
+ (with-simple-restart 'RETRY "Try again."
+ (lambda ()
+ (error "Disk save failed:" filename))))
+ (continuation
+ (lambda ()
+ (set! time-world-saved time)
+ (if (string? id) unspecific #f)))))))
+ ((ucode-primitive set-fixed-objects-vector!) fixed-objects))))
+ (read-microcode-tables!)
+ (flo:set-environment! float-env))
(lambda ()
(set! time-world-saved time)
(fluid-let ((*within-restore-window?* #t))