Project

General

Profile

Actions

Bug #1323

open

CIL doesn't appear to know GNU extension 'asm goto'

Added by Evgeny Novikov almost 13 years ago. Updated over 9 years ago.

Status:
Open
Priority:
Normal
Assignee:
Category:
CIL
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:
#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:
  1. Use options like for llvm aspectator that will prevent such constructions (the simplest way)
  2. Add some simplifications to C backend, e.g. to skip all 'asm goto's (it's harder)
  3. Add support of 'asm goto' to CIL (the hardest way)

Files


Related issues 1 (0 open1 closed)

Related to C Instrumentation Framework - Bug #1165: GCC-aspectator fails with fatal error: incorrect reference codeClosedEvgeny Novikov05/03/2011

Actions
Actions

Also available in: Atom PDF