[Git][cmucl/cmucl][issue-86-save-fpu-state-on-entry-to-alloc] 3 commits: Update comments
Raymond Toy
gitlab at common-lisp.net
Thu Aug 27 06:42:29 UTC 2020
Raymond Toy pushed to branch issue-86-save-fpu-state-on-entry-to-alloc at cmucl / cmucl
Commits:
a95db7ba by Raymond Toy at 2020-08-26T23:30:54-07:00
Update comments
- - - - -
ad3862c9 by Raymond Toy at 2020-08-26T23:34:05-07:00
Clean up code
- - - - -
01f8217b by Raymond Toy at 2020-08-26T23:41:36-07:00
Add -R flag to recompile lisp
- - - - -
3 changed files:
- .gitlab-ci.yml
- src/lisp/gencgc.c
- src/lisp/x86-arch.h
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -12,7 +12,7 @@ linux-runner:
- mkdir snapshot
- (cd snapshot; tar xjf ../cmucl-$version-linux.tar.bz2; tar xjf ../cmucl-$version-linux.extra.tar.bz2)
script:
- - bin/build.sh $bootstrap -C "" -o snapshot/bin/lisp
+ - bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
- bin/make-dist.sh -I dist linux-4
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
@@ -24,6 +24,6 @@ osx-runner:
- mkdir snapshot
- (cd snapshot; tar xjf ../cmucl-$version-darwin.tar.bz2)
script:
- - bin/build.sh $bootstrap -C "" -o snapshot/bin/lisp
+ - bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
- bin/make-dist.sh -I dist darwin-4
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
=====================================
src/lisp/gencgc.c
=====================================
@@ -8416,10 +8416,13 @@ void do_pending_interrupt(void);
char *
alloc(int nbytes)
{
-#if 0 && (defined(i386) || defined(__x86_64))
+#if (defined(i386) || defined(__x86_64))
/*
* Need to save and restore the FPU registers on x86, but only for
- * sse2. See Ticket #61.
+ * sse2. See Trac ticket #61
+ * (https://trac.common-lisp.net/cmucl/ticket/61) and gitlab
+ * ticket #86
+ * (https://gitlab.common-lisp.net/cmucl/cmucl/-/issues/86).
*
* Not needed by sparc or ppc because we never call alloc from
* Lisp directly to do allocation.
@@ -8457,20 +8460,6 @@ alloc(int nbytes)
set_current_region_free((lispobj) new_free_pointer);
break;
} else if (bytes_allocated <= auto_gc_trigger) {
-#if 1 && (defined(i386) || defined(__x86_64))
- /*
- * Need to save and restore the FPU registers on x86, but only for
- * sse2. See Ticket #61.
- *
- * Not needed by sparc or ppc because we never call alloc from
- * Lisp directly to do allocation.
- */
- FPU_STATE(fpu_state);
-
- if (fpu_mode == SSE2) {
- save_fpu_state(fpu_state);
- }
-#endif
/* Call gc_alloc. */
boxed_region.free_pointer = (void *) get_current_region_free();
boxed_region.end_addr =
@@ -8481,11 +8470,6 @@ alloc(int nbytes)
set_current_region_free((lispobj) boxed_region.free_pointer);
set_current_region_end((lispobj) boxed_region.end_addr);
-#if 1 && (defined(i386) || defined(__x86_64))
- if (fpu_mode == SSE2) {
- restore_fpu_state(fpu_state);
- }
-#endif
break;
} else {
/* Run GC and try again. */
@@ -8499,7 +8483,7 @@ alloc(int nbytes)
}
}
-#if 0 && (defined(i386) || defined(__x86_64))
+#if (defined(i386) || defined(__x86_64))
if (fpu_mode == SSE2) {
restore_fpu_state(fpu_state);
}
=====================================
src/lisp/x86-arch.h
=====================================
@@ -17,15 +17,13 @@ extern boolean os_support_sse2(void);
#define FPU_STATE_SIZE 27
/*
- * Need 512 byte area, aligned on a 16-byte boundary. So allocate
- * 512+16 bytes of space and let the routine adjust the appropriate
- * alignment.
+ * Need 512 byte area, aligned on a 16-byte boundary.
*/
#define SSE_STATE_SIZE 512
/*
* Just use the SSE size for both x87 and sse2 since the SSE size is
- * enough for either.
+ * enough for either. Make sure it's on a 16-byte boundary.
*/
#define FPU_STATE(name) u_int8_t name[SSE_STATE_SIZE] __attribute__((aligned(16)))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4b80a6e595faa3e2343b6235ce6d4332359dae99...01f8217b6637015454eb36363819fc05f6134c47
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4b80a6e595faa3e2343b6235ce6d4332359dae99...01f8217b6637015454eb36363819fc05f6134c47
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20200827/d7913393/attachment-0001.htm>
More information about the cmucl-cvs
mailing list