aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.h
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-09-29 16:08:59 +0200
committerBjörn Gustavsson <[email protected]>2011-09-06 11:11:29 +0200
commit9dda912e8d10ca98ced3fc79cf89f2e95a8a2382 (patch)
treee38112fcf21e080ebe3037340722309fda561378 /erts/emulator/beam/erl_process.h
parenteb840a79fd676292b323b82001a6332ca94df879 (diff)
downloadotp-9dda912e8d10ca98ced3fc79cf89f2e95a8a2382.tar.gz
otp-9dda912e8d10ca98ced3fc79cf89f2e95a8a2382.tar.bz2
otp-9dda912e8d10ca98ced3fc79cf89f2e95a8a2382.zip
BEAM: Unify allocation of X and float registers
In the half-word emulator, smp emulator, and non-smp emulator the X register and float register arrays were allocated in different ways. Always allocate the registers and store the pointers to the allocated register arrays in the scheduler data.
Diffstat (limited to 'erts/emulator/beam/erl_process.h')
-rw-r--r--erts/emulator/beam/erl_process.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 739aef3130..627f10b142 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -387,19 +387,15 @@ do { \
} while (0)
struct ErtsSchedulerData_ {
-
-#ifdef ERTS_SMP
/*
* Keep X registers first (so we get as many low
* numbered registers as possible in the same cache
* line).
*/
-#if !HALFWORD_HEAP
- Eterm save_reg[ERTS_X_REGS_ALLOCATED]; /* X registers */
-#else
- Eterm *save_reg;
-#endif
- FloatDef freg[MAX_REG]; /* Floating point registers. */
+ Eterm* x_reg_array; /* X registers */
+ FloatDef* f_reg_array; /* Floating point registers. */
+
+#ifdef ERTS_SMP
ethr_tid tid; /* Thread id */
struct erl_bits_state erl_bits_state; /* erl_bits.c state */
void *match_pseudo_process; /* erl_db_util.c:db_prog_match() */