Actions
Bug #1323
openCIL doesn't appear to know GNU extension 'asm goto'
Start date:
06/07/2011
Due date:
% Done:
0%
Estimated time:
Detected in build:
svn
Platform:
Published in build:
Description
Unfortunately, in compiling kernels with a new compiler like gcc 4.6.0 on which aspectator is based, we obtain constructions that cannot be parsed by CIL. For instance, in arch/x86/include/asm/cpufeature.h we have:
that leads to:
Possible ways of solution:
#if __GNUC__ > 4 || __GNUC_MINOR__ >= 5 asm goto(... : : "i" (bit) : : t_no); return true; t_no: return false; #else u8 flag; asm volatile(... : "=qm" (flag) : "i" (bit)); return flag; #endif
that leads to:
ZZZ: Exception: Frontc.ParseError("Parse error") .../inst/current/envs/linux-2.6.37/linux-2.6.37/arch/x86/include/asm/cpufeature.h[321:0-0] : syntax error Parsing error Ack! The gremlins again!: Frontc.ParseError("Parse error") Fatal error: exception Frontc.ParseError("Parse error")
Possible ways of solution:
- Use options like for llvm aspectator that will prevent such constructions (the simplest way)
- Add some simplifications to C backend, e.g. to skip all 'asm goto's (it's harder)
- Add support of 'asm goto' to CIL (the hardest way)
Files
Updated by Pavel Shved over 13 years ago
By the way, CIL is older than gcc 4.5. :)
I'd suggest to mimic the old compiler's behavior.
Updated by Evgeny Novikov over 13 years ago
- Priority changed from Urgent to High
At the moment the first way was chosen, so the issue has gone away for some time...
Updated by Pavel Shved over 13 years ago
- File drivers-43_1a-test-alloc_skb-U-spin_lock-alloc_skb_nonatomic-spin_unlock.o.usual.i drivers-43_1a-test-alloc_skb-U-spin_lock-alloc_skb_nonatomic-spin_unlock.o.usual.i added
- Status changed from New to Open
- Priority changed from High to Normal
This problem is still there with the upstream CIL.
Also, attaching the file to check if it works (from tests for 43_1a). You should remove -DGNUC_VERSION from model-db.xml to see the errors.
Updated by Evgeny Novikov almost 13 years ago
Shouldn't we report about this issue to CIL developers?
Updated by Evgeny Novikov over 10 years ago
- Assignee changed from Pavel Shved to Vadim Mutilin
Vadim, what is the status?
Updated by Hitesh Padekar over 10 years ago
Is there any update on this issue, I am facing similar issue on CIL version 1.7.3
Actions