AtariDreams
c5d000b1a8
[Thumb] Resolve FIXME: Use 'mov hi, $src; mov $dst, hi' ( #81908 )
...
Consider the following:
ldr r0, [r4]
ldr r7, [r0, #4 ]
cmp r7, r3
bhi .LBB0_6
cmp r0, r2
push {r0}
pop {r4}
bne .LBB0_3
movs r0, r6
pop {r4, r5, r6, r7}
pop {r1}
bx r1
Here is a snippet of the generated THUMB1 code of the K&R malloc
function that clang currently compiles to.
push {r0} ends up being popped to pop {r4}.
movs r4, r0 would destroy the flags set by cmp right above.
The compiler has no alternative in this case, except one:
the only alternative is to transfer through a high register.
However, it seems like LLVM does not consider that this is a valid
approach, even though it is a free clobbering a high register.
This patch addresses the FIXME so the compiler can do that when it can
in r10 or r11, or r12.
2024-04-05 10:18:22 +01:00
..
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2023-08-17 18:29:50 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2023-10-09 12:31:32 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2024-02-05 13:56:59 +01:00
2023-08-17 18:29:50 +01:00
2022-12-19 13:05:05 +01:00
2021-03-24 15:34:34 +00:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2023-08-17 18:29:50 +01:00
2022-12-19 13:05:05 +01:00
2023-08-17 18:29:50 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2023-08-17 18:29:50 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2023-05-17 17:03:15 +02:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2024-04-05 10:18:22 +01:00
2022-12-19 13:05:05 +01:00
2024-03-07 08:20:26 +00:00
2024-02-05 13:56:59 +01:00
2022-12-19 13:05:05 +01:00
2023-05-02 13:09:49 +01:00
2023-05-02 13:09:49 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2024-01-30 13:58:55 -08:00
2024-01-30 13:58:55 -08:00
2024-01-23 14:48:33 +01:00
2023-08-07 17:53:32 +01:00
2022-12-19 13:05:05 +01:00
2023-08-09 08:40:35 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00
2024-02-05 13:56:59 +01:00
2023-07-04 10:51:48 +01:00
2022-12-19 13:05:05 +01:00
2023-05-03 09:28:07 +01:00
2024-01-30 13:58:55 -08:00
2024-01-30 13:58:55 -08:00
2023-10-09 12:31:32 +01:00
2024-04-05 10:18:22 +01:00
2022-12-19 13:05:05 +01:00
2022-12-19 13:05:05 +01:00