Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

asm blocks not enabled, use -fasm-blocks

harshada28
Beginner
689 Views
I am trying to run my Makefile with icc (11.1) as compiler.

During make I got following error:
"asm blocks not enabled, use -fasm-blocks "

Found some post related to this and accordingly I tried to set CFLAGS=-fasm-blocks during make.

Then some other errors are prompted.

What could be the problem?

thanks,
Harshada.
0 Kudos
7 Replies
aazue
New Contributor I
689 Views
Hi
Maybe...
Use (./configure --help) to show all options you have default autoconf, if exist ...??
Regards
0 Kudos
harshada28
Beginner
689 Views
How would "configure help" help actually? Nwys I tried even configure --help also.
I tried to set CFLAGS=-fasm-blocks. But no luck.
0 Kudos
aazue
New Contributor I
689 Views
Hi
You can have some times specific flags that it must be obligatory used. declare flags stored ENV not working ...
Do not think that ./configure --help show exactly same all packages;
different with each package , (is not an help how to use 'configure' generally)
make ./configure --help 2 different packages source you understand probably
you build Is working well with using Gnu compiler ?

Regards ...
0 Kudos
Dale_S_Intel
Employee
689 Views
I believe -fasm-blocks allows the compiler to recognize "MS style" asm blocks, as opposed to the standard gcc style asm statements. Among the possibilities are that there are some problems with the asm code, or there may be some confusion if there is some mixing of asm styles in the same file, but I'm not really sure. Can you post some more info, like some of the actual errors or better yet a reproducible test case?
Thanks!
Dale
0 Kudos
harshada28
Beginner
689 Views
I am pasting the acutal error here:

noisereduction.c(229): error: asm blocks not enabled, use -fasm-blocks
__asm {
^

noisereduction.c(248): error #12: parsing restarts here after previous syntax error
}

And the code is:
__asm {
mov eax, 0
cpuid
mov long ptr [vender+0], ebx
mov long ptr [vender+4], edx
mov long ptr [vender+8], ecx
}
__asm {
mov eax, 01h
cpuid
mov cpeinfo, edx
mov cpsse3, ecx
}

0 Kudos
Om_S_Intel
Employee
689 Views

The -fasm-blocks option works for me.

$ cat x.c

void foo()

{

__asm {

mov eax, 0

cpuid

}

__asm {

mov eax, 01h

cpuid

}

}

$ icc -c -fasm-blocks x.c

$ icc -v

Version 12.0.1

0 Kudos
Om_S_Intel
Employee
689 Views
This also wors in icc 11.1. Could you please tell me your compiler version?

0 Kudos
Reply