Details
Diff Detail
Event Timeline
I was thinking of the following test:
# RUN: not llvm-mc %s -arch=mips -mcpu=mips32 -mattr=+fp64,-nooddspreg 2> %t0 | \ # RUN: FileCheck %s .module nooddspreg add.s $f1, $f2, $f4 # CHECK: :[[@LINE-1]]:15: error: -mno-odd-spreg prohibits the use of odd FPU registers .set oddspreg add.s $f1, $f2, $f4 # CHECK-NOT: :[[@LINE-1]]:15: error: -mno-odd-spreg prohibits the use of odd FPU registers .set mips0 add.s $f1, $f2, $f4 # CHECK: :[[@LINE-1]]:15: error: -mno-odd-spreg prohibits the use of odd FPU registers
Currently, the last check should fail because AssemblerOptions->front() wasn't updated when we processed the ".module nooddspreg".
However, seeing as the IAS doesn't have support for .set oddspreg/nooddspreg, the only option left is to use .module/.set fp=23/64/xx, which I don't really know how to.
I would appreciate some help with this.
So the '.set mips0' currently reverts to the state before the '.module nooddspreg'. That sounds like a bug to me.
The suggested test case looks sensible to me and it should be easy to implement '.set nooddspreg'. Could you add the test case to the patch?
Fixed a dumb bug in my original {set,clear}ModuleFeatureBits():
*The if was preventing the setting of the front options.
Added my proposed test case.
Added dependency on D10657.
LGTM with a nit
test/MC/Mips/update-module-level-options.s | ||
---|---|---|
10 ↗ | (On Diff #28254) | It's probably best to be less strict on the column. This check will succeed if the error appeared for column 10 for example. |