Error "Non-constant offsets error are not supported" parsing assembly with comments
| Bugzilla Link | 28547 |
| Resolution | FIXED |
| Resolved on | Jul 15, 2016 04:18 |
| Version | trunk |
| OS | Windows NT |
| CC | @pogo59 |
Extended Description
clang 3.9 @275278
repro.asm:
.intel_syntax vmovaps xmm15, xmmword ptr [rip+ones] # +1.0, +1.0, +1.0, +1.0
$ clang -c repro.asm repro.asm:2:39: error: Non-constant offsets are not supported! vmovaps xmm15, xmmword ptr [rip+ones] # +1.0, +1.0, +1.0, +1.0 ^
This seems to have been introduced by r273007 which introduce a change to how "CPPHash Directives" are handled during assembly parsing.
Fixed in rL275445.
Much appreciated thanks!
Fixed in rL275445.
Oh wow.
This is definitely a Parsing bug. Apparently the existence of a "." in the comment is causing this.
This is largely correct as "ones" is not defined.
The confusion arises from the error erronously pointing to the end-on-line comment instead of the reference to [rip+ones].
Hi Nirav, thanks for looking into this!
The strange thing is that in my case, if the # comment is removed then no errors is printed. Also if I add a definition for 'ones' the error is still printed, so it still seems like a bug to me, or did I miss your point?
Eg: Pass: .intel_syntax ones: .float +1.0, +1.0, +1.0, +1.0 vmovaps xmm15, xmmword ptr [rip+ones]
Fail: .intel_syntax ones: .float +1.0, +1.0, +1.0, +1.0 vmovaps xmm15, xmmword ptr [rip+ones] # +1.0, +1.0, +1.0, +1.0
This is largely correct as "ones" is not defined.
The confusion arises from the error erronously pointing to the end-on-line comment instead of the reference to [rip+ones].
Adding Nirav to CC as he is involved in this area of the compiler.