Introducing the Method for Controlling the Output of Bit Manipulation Instructions that Involve Memory Access |
In V2.05 and earlier versions of the compiler, except for intrinsic functions, there was no method for the user to always output bit manipulation instructions that involve memory access.
In V2.06, the compiler is modified to allow the user to control whether to output bit manipulation instructions that involve memory access, without using intrinsic functions.
To let the compiler output bit manipulation instructions that involve memory access without using intrinsic functions, create a source program that satisfies all the following conditions.
(a) A constant value is assigned.
(b) The value is assigned to a single-bit bit field of a 1-byte type.
(c) The bit field where the value is assigned is qualified with volatile.
To suppress the output of bit manipulation instructions that involve memory access, satisfy condition (c) above. Then, either assign a value that is not a constant in condition (a) or use a type that is not a 1-byte type in condition (b).
Otherwise, whether to output bit manipulation instructions that involve memory access is determined by the compiler according to the specified optimization level and the contents of the source program.
1-byte types are char, unsigned char, signed char, _Bool, and bool. _Bool and bool are excluded when -lang=c is specified. |
To always output bit manipulation instructions that involve memory access in V2.05, use intrinsic functions __bclr(), __bset(), and __bnot(). When the intrinsic functions are not used, whether to output bit manipulation instructions that involve memory access is determined by the compiler according to the specified optimization level and the contents of the source program.
The V2.04 and earlier versions of the compiler do not support these intrinsic functions. To check whether bit manipulation instructions that involve memory access are output, refer to the assembly source code output by the compiler.