<div dir="ltr">On 13 March 2013 13:43, Måns Rullgård <span dir="ltr"><<a href="mailto:mans@mansr.com" target="_blank">mans@mansr.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
One possible fix, which I have tested, is to look for the specific<br>
instructions requiring such a pair (LDRD/STRD and LDREXD/STREXD) in<br>
addition to the 'H' modifier.  However, there are probably other<br>
creative ways in which inline asm might rely on the specific pairing.<br></blockquote><div><br></div><div style>Hi Mans,</div><div style><br></div><div style>Either that method is ignoring an inline asm parser or there isn't one, but I agree, we should be able to have something better than just grep for possible extensions for paired registers.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thus I believe the safest solution is to always force 64-bit operands<br>
into even/odd pairs for any inline asm.  In other words, we should<br>
probably do something like this (untested):<br></blockquote><div><br></div><div style>I tested this, and it fails on other inline assembly tests. I think that the non-paired asm is correctly selected by the table generated parser, but when you pair things that didn't need pairing, the parser goes bad.</div>
<div style><br></div><div style>I don't think we should force pairing on every inline assembly either. Maybe someone knows how to parse inline assembly in a better way than it is currently being done? If there isn't any, than possibly creating a function to return "needsPairedRegister()" or something would still be ugly, but better than incrementing it inline.</div>
<div style><br></div><div style>cheers,</div><div style>--renato</div></div></div></div>