This could have been done in r359673, but I didn't think I would return
to this function so soon. Lift these macros from arm64 so we don't need
to worry about the size when inserting new elements.
Details
- Reviewers
kp br markj - Group Reviewers
riscv - Commits
- rS361587: Add macros simplifying the fake preload setup
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 31170 Build 28833: arc lint + arc unit
Event Timeline
sys/riscv/riscv/machdep.c | ||
---|---|---|
769 | BTW, anyone have a clue how this code works on arm/arm64? It would be good to enable or just remove it here as appropriate. sys/arm/include/elf.h has the following hint, but it's not clear enough to me: /* * Magic number for the elf trampoline, chosen wisely to be an immediate * value. */ #define MAGIC_TRAMP_NUMBER 0x5c000003 |
Seems ok to me aside from the comment.
sys/riscv/riscv/machdep.c | ||
---|---|---|
740 | I just forgot that riscv permits misaligned memory accesses. I'm not sure that the added roundup by 4 really helps anything? |
sys/riscv/riscv/machdep.c | ||
---|---|---|
740 | It permits it, but it may be emulated by M-mode if the hardware doesn't, so it should be avoided where possible as it will be orders of magnitude slower. |
Neat, did you find that somehow or were you already aware of its usage? I'll remove that section in a follow-up.
git blame on the definition in the header to find its introduction, then git log on elf_trampoline.c to find when that got GC'ed.
sys/riscv/riscv/machdep.c | ||
---|---|---|
740 | I dropped the rounding in the committed version, it did not change anything for the current set of preload data, and I intend on adding anything smaller than a uint32_t in there. |