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
..
2024-03-09 09:07:22 +00:00
2023-12-05 14:09:36 +01:00
2024-02-05 13:56:59 +01:00
2023-11-03 10:46:07 +01:00
2024-02-05 13:56:59 +01:00
2024-02-05 13:56:59 +01:00
2023-11-03 10:46:07 +01:00
2023-11-03 10:46:07 +01:00
2023-12-07 10:33:03 +00:00
2023-10-09 12:31:32 +01:00
2024-03-03 16:56:21 +00:00
2024-03-03 16:56:21 +00:00
2024-02-05 13:56:59 +01:00
2024-03-21 13:45:44 +00:00
2024-02-02 21:40:40 +00:00
2024-03-02 10:33:57 -08:00
2023-11-22 09:16:58 +00:00
2024-01-31 14:08:02 +00:00
2024-01-31 14:08:02 +00:00
2023-09-28 14:26:13 +01:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2024-01-31 14:08:02 +00:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2024-02-01 22:10:52 +08:00
2024-03-11 14:27:28 +00:00
2023-08-17 18:29:50 +01:00
2024-02-05 13:56:59 +01:00
2024-02-05 13:56:59 +01:00
2024-02-05 13:56:59 +01:00
2023-09-08 09:02:15 +01:00
2023-09-15 19:52:50 +00:00
2023-10-09 12:31:32 +01:00
2024-02-05 13:56:59 +01:00
2024-02-05 13:56:59 +01:00
2024-02-05 13:56:59 +01:00
2023-09-15 19:52:50 +00:00
2023-12-05 14:09:36 +01:00
2024-02-05 13:56:59 +01:00
2023-08-24 14:15:02 +01:00
2023-07-28 10:37:40 +01:00
2023-08-07 17:53:32 +01:00
2023-10-18 19:40:11 +01:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2023-10-09 12:31:32 +01:00
2023-12-05 14:09:36 +01:00
2023-12-18 18:57:36 +07:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2023-12-07 10:33:03 +00:00
2023-10-24 20:27:39 -07:00
2023-10-28 17:10:20 +08:00
2023-08-24 14:15:02 +01:00
2024-02-05 13:56:59 +01:00
2024-02-26 12:23:25 +00:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2023-08-21 12:05:32 +02:00
2023-12-05 14:09:36 +01:00
2023-12-14 21:16:11 +08:00
2023-09-28 14:26:13 +01:00
2023-10-09 12:31:32 +01:00
2024-02-01 22:10:52 +08:00
2023-10-09 12:31:32 +01:00
2023-09-18 09:45:46 -07:00
2024-02-05 13:56:59 +01:00
2023-08-01 14:00:37 +02:00
2023-10-09 12:31:32 +01:00
2023-08-10 16:40:04 -04:00
2024-03-21 20:24:57 -04:00
2024-02-26 12:12:31 +00:00
2024-02-01 11:42:18 +00:00
2023-09-18 09:45:46 -07:00
2023-08-16 17:31:21 +01:00
2024-02-05 13:56:59 +01:00
2024-04-05 10:18:22 +01:00
2024-04-05 10:18:22 +01:00
2024-03-21 13:45:44 +00:00
2024-02-04 16:05:51 -08:00
2023-12-05 14:09:36 +01:00
2023-12-12 16:07:26 +08:00
2024-01-16 10:30:16 +00:00
2023-10-09 12:31:32 +01:00
2023-10-31 15:30:08 -07:00
2023-10-16 12:17:24 +02:00
2024-01-22 13:16:31 -08:00
2023-10-09 12:31:32 +01:00
2024-02-05 13:56:59 +01:00
2023-08-17 18:29:50 +01:00
2023-10-11 14:57:15 -07:00
2023-09-22 22:03:21 +02:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2023-10-09 12:31:32 +01:00
2023-10-24 20:27:39 -07:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2024-02-02 21:40:40 +00:00
2024-01-09 13:32:59 +07:00
2024-01-17 15:59:33 +00:00
2024-03-11 14:27:28 +00:00
2023-10-09 12:31:32 +01:00
2024-04-05 10:18:22 +01:00