David Chisnall
2015-Feb-05 17:32 UTC
[LLVMdev] Fwd: [cfe-dev] freebsd-mips64 unhandled .cpsetup
Moving to llvmdev, as this is not a clang issue. David> Begin forwarded message: > > Date: 5 February 2015 17:00:34 GMT > From: Sean Bruno <sbruno at ignoranthack.me> > To: cfe-dev at cs.uiuc.edu > Subject: [cfe-dev] freebsd-mips64 unhandled .cpsetup > Reply-To: sbruno at freebsd.org > > > I'm taking a journey to try and get a clang/llvm build of freebsd-mips64 > completed by grabbing various patches and enhancements from around the > internet and get them into one central place for review by all > concerned. (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197259#c11) > > I've snagged some patches for MIPS from cheri-bsd and some from pending > MIPS reviews in phabricator but seem to be stuck on handling .cpsetup > when building gnu csu bits, specifically: > > End of search list. > <inline asm>:6:20: error: expected identifier > .cpsetup $31, $2, 1b > ^ > Assertion failed: (!Name.empty() && "Normal symbols cannot be > unnamed!"), function GetOrCreateSymbol, file > /home/sbruno/bsd/clang360-import/lib/clang/libllvmmc/../../../contrib/llvm/lib/MC/MCContext.cpp, > line 101. > > > Obviously, this is handled by gcc "just fine" in our case, but I'm more > interested in moving forward to clang. :-) > > sean
Daniel Sanders
2015-Feb-06 09:07 UTC
[LLVMdev] [cfe-dev] freebsd-mips64 unhandled .cpsetup
I've had a quick look and it seems the problem is that we're parsing the last operand with parseIdentifier() which doesn't have any of the code to handle relative symbols like '1b' or '1f'. I think we need to be using parseExpression() like we do in parseJumpTarget() and parseImm(). Toma: Could you look into fixing this along with the other integrated assembler issues you are working on?> -----Original Message----- > From: Dr D. Chisnall [mailto:dc552 at hermes.cam.ac.uk] On Behalf Of David > Chisnall > Sent: 05 February 2015 17:33 > To: LLVM Dev; Daniel Sanders; Sean Bruno > Subject: Fwd: [cfe-dev] freebsd-mips64 unhandled .cpsetup > > Moving to llvmdev, as this is not a clang issue. > > David > > > Begin forwarded message: > > > > Date: 5 February 2015 17:00:34 GMT > > From: Sean Bruno <sbruno at ignoranthack.me> > > To: cfe-dev at cs.uiuc.edu > > Subject: [cfe-dev] freebsd-mips64 unhandled .cpsetup > > Reply-To: sbruno at freebsd.org > > > > > > I'm taking a journey to try and get a clang/llvm build of freebsd-mips64 > > completed by grabbing various patches and enhancements from around > the > > internet and get them into one central place for review by all > > concerned. > (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197259#c11) > > > > I've snagged some patches for MIPS from cheri-bsd and some from > pending > > MIPS reviews in phabricator but seem to be stuck on handling .cpsetup > > when building gnu csu bits, specifically: > > > > End of search list. > > <inline asm>:6:20: error: expected identifier > > .cpsetup $31, $2, 1b > > ^ > > Assertion failed: (!Name.empty() && "Normal symbols cannot be > > unnamed!"), function GetOrCreateSymbol, file > > /home/sbruno/bsd/clang360- > import/lib/clang/libllvmmc/../../../contrib/llvm/lib/MC/MCContext.cpp, > > line 101. > > > > > > Obviously, this is handled by gcc "just fine" in our case, but I'm more > > interested in moving forward to clang. :-) > > > > sean
> -----Original Message----- > From: Daniel Sanders > Sent: 06 February 2015 09:08 > To: David Chisnall; LLVM Dev; Sean Bruno; Toma Tabacu > Subject: RE: [cfe-dev] freebsd-mips64 unhandled .cpsetup > > I've had a quick look and it seems the problem is that we're parsing the last operand with parseIdentifier() which doesn't have any of the code to handle relative symbols like '1b' or '1f'. > I think we need to be using parseExpression() like we do in parseJumpTarget() and parseImm(). > > Toma: Could you look into fixing this along with the other integrated assembler issues you are working on? >Yes, I'll look into it. Regards, Toma Tabacu
> Toma: > > Hey, I'm the bsd nerd trying to get our mips target switched over to clang/llvm. I looked at switching the mips asm parser over to > parseExpression() but I am unfamiliar with the syntax to do this for .cpsetup. > > If you do look into this, let me know and I'll bang on it in my > clang36 pre-release tree. > > sean >Hi, I've managed to replace parseIdentifier() with parseExpression() and you're example doesn't give an error anymore, but I'm not sure that what we end up generating is correct. I need a little more time to find out. In the meantime, could you open a ticket on llvm.org/bugs ? Thanks for working on this, btw ! Regards, Toma Tabacu
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 02/09/15 09:09, Toma Tabacu wrote:> >> Toma: >> >> Hey, I'm the bsd nerd trying to get our mips target switched over >> to clang/llvm. I looked at switching the mips asm parser over >> to parseExpression() but I am unfamiliar with the syntax to do >> this for .cpsetup. >> >> If you do look into this, let me know and I'll bang on it in my >> clang36 pre-release tree. >> >> sean >> > > Hi, > > I've managed to replace parseIdentifier() with parseExpression() > and you're example doesn't give an error anymore, but I'm not sure > that what we end up generating is correct. I need a little more > time to find out. > > In the meantime, could you open a ticket on llvm.org/bugs ? > > Thanks for working on this, btw ! > > Regards, Toma Tabacu > > >Toma: Just wondering if you want me to poke at anything to validate. sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJU4kApXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k+l0H/Ru/E5tPEfERlUroE09kGjlW RFzrvbH5nfgmJryz6+QOQ6SkKAy4k5bIqjaTRKLdPKD/QaZllSQrrkH4uluTiVSO Xvw6nRYDXYCTm8YbS4+FwDRWdePgabzeOP/jIk/VeHvh1u5GNCu4+UCYv+aAq1q8 QXsNsdnHriEbeP490z/lLpnPY2WGEmIhCckhUGI+qa7FhksHdj4xklJrlejbxdxz XjX6Bfa0NsCHO1pBd5nDKCFdYN7vqGa5c5G8UotyGPUldulgCjlbcrtay13+YIg1 20Wo2/R13qwCB15DxDifxQncRGEqmfhw6tD5/ykbXCF8EetfxFcQDfXGA8J2dUw=wTWy -----END PGP SIGNATURE-----
Maybe Matching Threads
- [LLVMdev] [cfe-dev] freebsd-mips64 unhandled .cpsetup
- compiler-rt fails to find <stdarg.h> on FreeBSD
- 10.0 BETA 3 with redports kernel panic
- ATI Radeon 4250 in Dual Head Config?
- [LLVMdev] Kaleidoscope toy4 failure seg fault on llvm::ExecutionEngine::getTargetData (this=0x0)