Rewrite fallback unld* - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_arm-cpu.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年04月12日 17:09:55 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2023年04月12日 17:09:55 -0300
commitaea55e09cf49354e576518c01c99895129f9c613 (patch)
treecab8302e22c0306d5497f347346e531267887ca4 /lib/jit_arm-cpu.c
parent03729793119651ffd38c0545ef3fd15d6b4e9218 (diff)
downloadlightning-aea55e09cf49354e576518c01c99895129f9c613.tar.gz
Rewrite fallback unld*
The rewrite assume memory is always aligned at least wordsize * 2. There is a small chance of this new code causing faults, but for the moment assume that if unaligned memory access is being used, the condition will not happen. The condition is basically, assume 16 byte block with 64 bits: ................ and code calls jit_unld* to read 4 bytes with address of the first x: ........|.xxxx.. because it will read 16 bytes starting at '|', it will read 8 bytes past the end of a memory map if those 'xxxx' are at the end of the map. This happens because the new code does not check if the value to load crosses a word boundary, and loads the one starting at '|', and the next after the last '.'. Then, it merges the value to form a single sizeof(jit_word_t) byte value, and finally sign or zero extends the result.
Diffstat (limited to 'lib/jit_arm-cpu.c')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月24日 09:58:05 +0000

AltStyle によって変換されたページ (->オリジナル) /