Oliver Stannard
93a823bc7a
[Thumb1] Re-write emitThumbRegPlusImmediate
...
This was motivated by a bug which caused code like this to be
miscompiled:
declare void @take_ptr(i8*)
define void @test() {
%addr1.32 = alloca i8
%addr2.32 = alloca i32, i32 1028
call void @take_ptr(i8* %addr1)
ret void
}
This was emitting the following assembly to get the value of %addr1:
add r0, sp, #1020
add r0, r0, #8
However, "add r0, r0, #8 " is not a valid Thumb1 instruction, and this
could not be assembled. The generated object file contained this,
resulting in r0 holding SP+8 rather tha SP+1028:
add r0, sp, #1020
add r0, sp, #8
This function looked like it could have caused miscompilations for
other combinations of registers and offsets (though I don't think it is
currently called with these), and the heuristic it used did not match
the emitted code in all cases.
llvm-svn: 222125
2014-11-17 11:18:10 +00:00
..
2010-11-29 19:44:50 +00:00
2014-01-09 03:28:55 +00:00
2014-11-03 10:58:05 +00:00
2014-08-13 16:26:38 +00:00
2014-08-13 16:26:38 +00:00
2014-09-11 21:46:33 +00:00
2014-04-14 00:51:57 +00:00
2013-01-10 00:45:19 +00:00
2014-04-29 16:31:29 +00:00
2014-04-29 17:07:42 +00:00
2011-11-04 18:30:30 +00:00
2014-04-09 06:08:46 +00:00
2014-08-13 16:26:38 +00:00
2014-04-07 04:17:22 +00:00
2014-11-07 04:46:10 +00:00
2014-11-14 08:38:17 +00:00
2014-11-04 01:12:21 +00:00
2014-11-04 01:15:53 +00:00
2014-04-05 21:53:04 +00:00
2014-06-16 11:09:46 +00:00
2014-09-03 11:41:21 +00:00
2014-11-07 09:08:39 +00:00
2013-01-10 00:45:19 +00:00
2014-11-04 01:12:21 +00:00
2014-11-04 01:12:21 +00:00
2014-04-21 22:55:11 +00:00
2013-01-25 07:45:25 +00:00
2014-10-23 04:08:38 +00:00
2014-08-27 18:13:25 +00:00
2014-11-12 15:16:30 +00:00
2014-09-11 22:55:25 +00:00
2014-08-30 02:30:02 +00:00
2014-06-13 17:20:48 +00:00
2013-01-10 00:45:19 +00:00
2014-06-13 21:20:44 +00:00
2014-11-04 21:01:48 +00:00
2014-09-02 17:49:23 +00:00
2014-09-12 15:12:32 +00:00
2014-04-07 04:17:22 +00:00
2014-09-25 21:00:38 +00:00
2014-04-07 04:17:22 +00:00
2014-07-23 17:18:05 +00:00
2014-08-13 16:26:38 +00:00
2014-08-13 16:26:38 +00:00
2014-06-26 22:52:05 +00:00
2013-12-12 15:45:32 +00:00
2014-09-17 18:23:07 +00:00
2010-11-29 18:16:10 +00:00
2014-09-17 15:43:01 +00:00
2013-01-10 00:45:19 +00:00
2014-06-12 21:46:39 +00:00
2014-09-04 16:54:47 +00:00
2014-08-13 16:26:38 +00:00
2014-11-17 11:18:10 +00:00
2014-10-06 13:48:07 +00:00
2014-06-12 21:46:39 +00:00
2014-10-08 00:22:18 +00:00
2014-11-13 04:56:41 +00:00
2014-08-23 22:49:22 +00:00
2014-08-23 22:49:22 +00:00
2014-08-13 16:26:38 +00:00
2014-10-16 10:10:07 +00:00
2014-08-30 16:48:02 +00:00
2010-11-29 18:16:10 +00:00
2014-03-10 03:53:12 +00:00
2014-10-07 05:48:40 +00:00
2014-11-04 12:35:47 +00:00
2014-06-25 15:47:36 +00:00
2014-03-10 03:53:12 +00:00
2014-09-25 20:30:58 +00:00
2014-03-30 11:36:29 +00:00
2013-08-27 11:20:13 +00:00
2014-04-07 04:17:22 +00:00
2014-04-15 05:53:26 +00:00
2013-01-10 00:45:19 +00:00
2014-08-23 22:49:22 +00:00
2014-04-10 09:44:32 +00:00
2014-06-24 05:59:52 +00:00
2014-04-07 04:17:22 +00:00
2014-04-07 04:17:22 +00:00
2013-05-21 20:36:13 +00:00
2014-08-21 23:24:08 +00:00
2014-09-15 22:20:31 +00:00
2014-11-13 07:23:22 +00:00
2014-06-19 01:09:49 +00:00
2014-11-04 01:28:33 +00:00
2013-06-14 15:12:13 +00:00
2014-10-15 16:12:52 +00:00
2012-03-26 21:56:56 +00:00
2014-11-05 04:44:31 +00:00
2013-01-10 00:45:19 +00:00
2014-04-14 00:51:57 +00:00
2014-08-29 01:05:12 +00:00
2014-08-25 18:16:47 +00:00
2014-03-07 15:54:23 +00:00
2014-05-13 10:11:29 +00:00
2014-04-21 22:55:11 +00:00
2014-08-23 23:07:14 +00:00
2014-03-30 11:20:25 +00:00
2013-03-26 01:27:52 +00:00
2014-09-11 21:46:33 +00:00
2014-08-13 16:26:38 +00:00
2014-08-27 19:03:22 +00:00
2014-09-15 18:39:24 +00:00