Thread: X64 inline asm
View Single Post
  #23  
Old 06-22-2010, 20:44
Fyyre's Avatar
Fyyre Fyyre is offline
Fyyre
 
Join Date: Dec 2009
Location: 0°N 0°E / 0°N 0°E / 0; 0
Posts: 259
Rept. Given: 75
Rept. Rcvd 85 Times in 38 Posts
Thanks Given: 141
Thanks Rcvd at 335 Times in 113 Posts
Fyyre Reputation: 85
1b. As
Code:
int array[8] = {array[0] = 10, array[5] = 60};
Both macros, yes.

Somethings will require slight adjusting. I too use the Intel Compiler for driver building, from inside of Visual Studio 2008.

-Fyyre

Quote:
Originally Posted by matt View Post
The issue with inline asm is you have to implement differnet set for different arch: i386, x86_64, IA64 etc. The only motivation for me, is using "lock", since VS lacks of support.

Anyone is familiar with Intel c compiler for Windows ? I want to confirm whehter intel c compiler supports these items:

1, structure designated initializers
Three formats are widely used, especially the 1st:
a) struct test {int i, j, k, l;} a = {.l = 60, .i = 10};
b) int array[8] = {[0] = 10, [5] = 60}; /* only initialize the
1st and 5th members */
c) struct test {int i, j, k, l;} a = {l = 60, i = 10};

2, macros to return a value

Complex macroes need "({ ... )}" style to return a value, eg:
1) #define min(X, Y) ({ typeof (X) x_ = (X); typeof (Y) y_ = (Y); \
(x_ < y_) ? x_ : y_; })
2) #define my_macro(cond, p1) ({while (cond) {rc = func(p1);}; rc;})
WDK compiler only supports "()" or "{}" styles. the former can carry
a return value but with limitations; the latter can not return a value
to its caller.
3, typeof

I'd like to replace MS compiler of WinDDK if intel compiler supports these features.
Reply With Quote
The Following User Says Thank You to Fyyre For This Useful Post:
Indigo (07-19-2019)