boolean and interger operation declaration in gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,

I have a machine, with a condition code register of type BImode.
It is 12 bit, can hold boolean flags.

Now, consider following C-code:

bool a, b ;

if(a == b)
  // do this
else
  // do that

In Gcc, it will call the "cbranchsi4" construct to translate this to RTL,
and then, on my machine, a and b can either be:
  a. In general register file.
  b. In the condition register.
Now, to do this test, I need to call the XOR function. There is a predefined macro for this,
  xorsi3.

Question is : Am I allowed to put the binary XOR operation here , with the source and destination register constrained to be type "y", meaning condition register, able to hold type BImode, and nothing else ?. Or should I define "xorbi3", but then how do I refer to "xorsi3"
to make the compiler clear it can also use the 32-bit XOR for binary XOR ?.

Best Regards,

Henri.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux