Community
cancel
Showing results for 
Search instead for 
Did you mean: 
harshada28
Beginner
111 Views

asm blocks not enabled, use -fasm-blocks

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
111 Views

Hi
Maybe...
Use (./configure --help) to show all options you have default autoconf, if exist ...??
Regards
harshada28
Beginner
111 Views

How would "configure help" help actually? Nwys I tried even configure --help also.
I tried to set CFLAGS=-fasm-blocks. But no luck.
aazue
New Contributor I
111 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 ...
Dale_S_Intel
Employee
111 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
harshada28
Beginner
111 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
}

Om_S_Intel
Employee
111 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

Om_S_Intel
Employee
111 Views

This also wors in icc 11.1. Could you please tell me your compiler version?

Reply