Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use assembly in GC_get_procedure_stack (E2K)
(a cherry-pick of commits d3f5bdc, 41d41c3 from 'master') Issue #411 (bdwgc). Use E2K_GET_PROCEDURE_STACK_SIZE and E2K_READ_PROCEDURE_STACK_EX sub-functions (of access_hw_stacks syscall) instead of the legacy E2K_READ_PROCEDURE_STACK one which required computation of ps_index manually. Check the stack size right before reading the stack (to avoid EINVAL). * mach_dep.c [E2K] (VA_SIZE, E2K_PSHTP_SIZE, VLIW_CMD_BRACES_PREFIX, get_stack_index): Remove macro. * mach_dep.c [E2K] (GC_get_procedure_stack): Initialize new_sz only if buf is null; define stack_ofs local variable instead of ps; add assertion that new_sz is non-zero and multiple of word size; use E2K_GET_PROCEDURE_STACK_SIZE sub-function instead of E2K_READ_PROCEDURE_STACK to get H/W procedure stack size (call E2K_GET_PROCEDURE_STACK_SIZE sub-function right before E2K_READ_PROCEDURE_STACK_EX one to check that the procedure stack size has not changed since the previous call of GC_get_procedure_stack(NULL,0)); do not use get_stack_index(); use E2K_READ_PROCEDURE_STACK_EX sub-function (with stack_ofs=0) instead of E2K_READ_PROCEDURE_STACK to read H/W procedure stack from the given stack_ofs; print new_sz (in addition to errno) in case of error and not EAGAIN; add comment. * mach_dep.c [E2K && LOG_E2K_ALLOCS] (GC_get_procedure_stack): Remove code. * mach_dep.c [E2K && THREADS] (GC_alloc_and_get_procedure_stack): Add TODO item.
- Loading branch information