RESOLVED FIXED 152693
[mips] Lower immediates of logical operations.
https://bugs.webkit.org/show_bug.cgi?id=152693
Summary [mips] Lower immediates of logical operations.
Konstantin Tokarev
Reported 2016-01-04 09:50:46 PST
On MIPS immediate operand of andi is required to be 16-bit non-negative number.
Attachments
Lower immediates of andi and andp (1.69 KB, patch)
2016-01-04 10:01 PST, Konstantin Tokarev
no flags
Patch (1.83 KB, patch)
2016-01-07 09:25 PST, Konstantin Tokarev
no flags
Patch (1.44 KB, patch)
2016-01-19 02:30 PST, Konstantin Tokarev
no flags
Konstantin Tokarev
Comment 1 2016-01-04 10:01:00 PST
Created attachment 268200 [details] Lower immediates of andi and andp
Julien Brianceau
Comment 2 2016-01-05 07:03:45 PST
Comment on attachment 268200 [details] Lower immediates of andi and andp View in context: https://bugs.webkit.org/attachment.cgi?id=268200&action=review LGTM > Source/JavaScriptCore/offlineasm/mips.rb:525 > + when "andi", "andp" Please add other logical operations having this limitation (ori, orp, xori and xorp)
Konstantin Tokarev
Comment 3 2016-01-07 09:25:52 PST
Julien Brianceau
Comment 4 2016-01-07 09:32:50 PST
Great, thanks
Konstantin Tokarev
Comment 5 2016-01-07 13:35:53 PST
Michael, could you take a look at this?
Michael Saboff
Comment 6 2016-01-07 14:09:35 PST
Comment on attachment 268455 [details] Patch r=me
WebKit Commit Bot
Comment 7 2016-01-07 14:13:56 PST
Comment on attachment 268455 [details] Patch Clearing flags on attachment: 268455 Committed r194725: <http://trac.webkit.org/changeset/194725>
WebKit Commit Bot
Comment 8 2016-01-07 14:13:59 PST
All reviewed patches have been landed. Closing bug.
Julien Brianceau
Comment 9 2016-01-15 00:51:25 PST
*** Bug 150376 has been marked as a duplicate of this bug. ***
Guillaume Emont
Comment 10 2016-01-18 18:35:30 PST
(In reply to comment #3) > Created attachment 268455 [details] > Patch Sorry, I'm a bit late here ;). I understood that the andi, ori and xori instructions interpret the 16 bit immediate as unsigned, so I understand that we could use the instruction for the range 0x0..0xffff, and not only for 0x0..0x7fff. Or did I miss something?
Julien Brianceau
Comment 11 2016-01-19 02:02:13 PST
(In reply to comment #10) > Sorry, I'm a bit late here ;). I understood that the andi, ori and xori > instructions interpret the 16 bit immediate as unsigned, so I understand > that we could use the instruction for the range 0x0..0xffff, and not only > for 0x0..0x7fff. Or did I miss something? You're right. However if this case happens (immediate value in 0x7fff..0xffff), we'll also have to update the mipsOperand method of Immediate class to accept this range.
Konstantin Tokarev
Comment 12 2016-01-19 02:16:46 PST
Guillaume: you ar right, thanks for the gotcha. Julien: Immediate.mipsOperand allows -0x7fff <= value <= 0xffff, so it is already accepted.
Konstantin Tokarev
Comment 13 2016-01-19 02:30:15 PST
Reopening to attach new patch.
Konstantin Tokarev
Comment 14 2016-01-19 02:30:18 PST
Julien Brianceau
Comment 15 2016-01-19 02:47:58 PST
(In reply to comment #12) > Julien: Immediate.mipsOperand allows -0x7fff <= value <= 0xffff, so it is > already accepted. Indeed, I read too quickly :)
Michael Saboff
Comment 16 2016-01-19 08:12:40 PST
Comment on attachment 269263 [details] Patch r=me
WebKit Commit Bot
Comment 17 2016-01-19 09:03:25 PST
Comment on attachment 269263 [details] Patch Clearing flags on attachment: 269263 Committed r195290: <http://trac.webkit.org/changeset/195290>
WebKit Commit Bot
Comment 18 2016-01-19 09:03:28 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.