Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert with missing operand #92

Open
jbush001 opened this issue Aug 31, 2017 · 0 comments
Open

Assert with missing operand #92

jbush001 opened this issue Aug 31, 2017 · 0 comments

Comments

@jbush001
Copy link
Owner

The following (which is missing an argument in the macro instantiation):

.macro test_vvm operation, result, mask, operand1
                lea s0, \operand1
                load_v v0, (s0)
                move v2, 0  
                li s1, \mask
                \operation v2, s1, v0
                lea s0, \result
                load_v v3, (s0)
                cmpne_i s1, v2, v3
                bz s1, 1f
                call fail_test
1:
.endmacro

test_vvm reciprocal, result23, vec_op3

result23: .float 0.0, 0.5, 0.0, 0.125, 0.0, 0.03125, 0.0, 0.0078125, 0.0, 0.001953125, 0.0, 0.00048828125, 0.0, 0.0001220703125, 0.0, 0.000030517578125

Will assert after printing an error:

<instantiation>:1:9: error: unknown token in expression
lea s0, 
        ^
bad.S:16:1: note: while in macro instantiation
test_vvm reciprocal, result23, vec_op3
^
Assertion failed: (isImm() && "This is not an immediate"), function getImm, file /Users/jeffbush/src/NyuziToolchain/include/llvm/MC/MCInst.h, line 77.
0  clang-6.0                0x000000010190537c llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 60
1  clang-6.0                0x00000001019058f9 PrintStackTraceSignalHandler(void*) + 25
2  clang-6.0                0x0000000101901709 llvm::sys::RunSignalHandlers() + 425
3  clang-6.0                0x0000000101905d72 SignalHandler(int) + 354
4  libsystem_platform.dylib 0x00007fffacf54b3a _sigtramp + 26
5  libsystem_platform.dylib 0x00007f9f03c12530 _sigtramp + 1456200208
6  libsystem_c.dylib        0x00007fffacdd9420 abort + 129
7  libsystem_c.dylib        0x00007fffacda0893 basename_r + 0
8  clang-6.0                0x00000001001ee948 llvm::MCOperand::getImm() const + 104
9  clang-6.0                0x00000001001eb52d (anonymous namespace)::NyuziAsmParser::ProcessInstruction(llvm::MCInst&, llvm::SMLoc const&, llvm::MCStreamer&) + 189
10 clang-6.0                0x00000001001e0bb6 (anonymous namespace)::NyuziAsmParser::MatchAndEmitInstruction(llvm::SMLoc, unsigned int&, llvm::SmallVectorImpl<std::__1::unique_ptr<llvm::MCParsedAsmOperand, std::__1::default_delete<llvm::MCParsedAsmOperand> > >&, llvm::MCStreamer&, unsigned long long&, bool) + 278
11 clang-6.0                0x0000000101365d71 (anonymous namespace)::AsmParser::parseStatement((anonymous namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) + 20817
12 clang-6.0                0x000000010135699c (anonymous namespace)::AsmParser::Run(bool, bool) + 1484
13 clang-6.0                0x00000001001b4d12 ExecuteAssembler((anonymous namespace)::AssemblerInvocation&, clang::DiagnosticsEngine&) + 23922
14 clang-6.0                0x00000001001aa5ac cc1as_main(llvm::ArrayRef<char const*>, char const*, void*) + 2524
15 clang-6.0                0x0000000100191ed6 ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 1094
16 clang-6.0                0x000000010018ef09 main + 4457
17 libdyld.dylib            0x00007fffacd45235 start + 1
18 libdyld.dylib            0x0000000000000014 start + 1395371488
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant