X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fsparc-assem.S;h=895128abb4fdcc5f63f71904acbd3dcc86c1b89f;hb=d01d509257052e694365b76be5ab597fa06764ec;hp=6c2af48150f22110fe47e0b8a4afb6bafa20c794;hpb=cdd026dddac3eaddbaa0221503e49e2673d54545;p=sbcl.git diff --git a/src/runtime/sparc-assem.S b/src/runtime/sparc-assem.S index 6c2af48..895128a 100644 --- a/src/runtime/sparc-assem.S +++ b/src/runtime/sparc-assem.S @@ -308,9 +308,113 @@ sparc_flush_icache: retl ! return from leaf routine nop + .global do_pending_interrupt + FUNCDEF(do_pending_interrupt) +do_pending_interrupt: + unimp trap_PendingInterrupt + retl + nop + +/* + * Save the FPU state. %o0 contains a pointer to where we can + * store our state. + */ + +/* + * Note we only save the 16 double-float registers (which saves + * the 32 single-float values too, I think). If we're compiling for + * a sparc v9, the Lisp code can actually use all 32 double-float + * registers. For later. + */ + .global fpu_save + FUNCDEF(fpu_save) +fpu_save: + std %f0, [%o0 + 4*0] + std %f2, [%o0 + 4*2] + std %f4, [%o0 + 4*4] + std %f6, [%o0 + 4*6] + std %f8, [%o0 + 4*8] + std %f10, [%o0 + 4*10] + std %f12, [%o0 + 4*12] + std %f14, [%o0 + 4*14] + std %f16, [%o0 + 4*16] + std %f18, [%o0 + 4*18] + std %f20, [%o0 + 4*20] + std %f22, [%o0 + 4*22] + std %f24, [%o0 + 4*24] + std %f26, [%o0 + 4*26] + std %f28, [%o0 + 4*28] + std %f30, [%o0 + 4*30] +#ifdef FEATURE_SPARC_V9 + std %f32, [%o0 + 4*32] + std %f34, [%o0 + 4*34] + std %f36, [%o0 + 4*36] + std %f38, [%o0 + 4*38] + std %f40, [%o0 + 4*40] + std %f42, [%o0 + 4*42] + std %f44, [%o0 + 4*44] + std %f46, [%o0 + 4*46] + std %f48, [%o0 + 4*48] + std %f50, [%o0 + 4*50] + std %f52, [%o0 + 4*52] + std %f54, [%o0 + 4*54] + std %f56, [%o0 + 4*56] + std %f58, [%o0 + 4*58] + std %f60, [%o0 + 4*60] + std %f62, [%o0 + 4*62] + st %fsr, [%o0 + 4*64] +#else + st %fsr, [%o0 + 4*32] +#endif + retl + nop + + .global fpu_restore + FUNCDEF(fpu_restore) +fpu_restore: + ldd [%o0 + 4*0], %f0 + ldd [%o0 + 4*2], %f2 + ldd [%o0 + 4*4], %f4 + ldd [%o0 + 4*6], %f6 + ldd [%o0 + 4*8], %f8 + ldd [%o0 + 4*10], %f10 + ldd [%o0 + 4*12], %f12 + ldd [%o0 + 4*14], %f14 + ldd [%o0 + 4*16], %f16 + ldd [%o0 + 4*18], %f18 + ldd [%o0 + 4*20], %f20 + ldd [%o0 + 4*22], %f22 + ldd [%o0 + 4*24], %f24 + ldd [%o0 + 4*26], %f26 + ldd [%o0 + 4*28], %f28 + ldd [%o0 + 4*30], %f30 +#ifdef FEATURE_SPARC_V9 + ldd [%o0 + 4*32], %f32 + ldd [%o0 + 4*34], %f34 + ldd [%o0 + 4*36], %f36 + ldd [%o0 + 4*38], %f38 + ldd [%o0 + 4*40], %f40 + ldd [%o0 + 4*42], %f42 + ldd [%o0 + 4*44], %f44 + ldd [%o0 + 4*46], %f46 + ldd [%o0 + 4*48], %f48 + ldd [%o0 + 4*50], %f50 + ldd [%o0 + 4*52], %f52 + ldd [%o0 + 4*54], %f54 + ldd [%o0 + 4*56], %f56 + ldd [%o0 + 4*58], %f58 + ldd [%o0 + 4*60], %f60 + ldd [%o0 + 4*62], %f62 + ld [%o0 + 4*64], %fsr +#else + ld [%o0 + 4*32], %fsr +#endif + retl + nop + .global save_context FUNCDEF(save_context) save_context: ta ST_FLUSH_WINDOWS ! flush register windows retl ! return from leaf routine - nop + nop