} else if (val > 0) {
/* Scale up */
- if ((p2 = powerof2 (val)) > 0 && p2 <= 4) {
+ if ((p2 = PowerOf2 (val)) > 0 && p2 <= 4) {
/* Factor is 2, 4, 8 and 16, use special function */
switch (flags & CF_TYPE) {
/* Scale down */
val = -val;
- if ((p2 = powerof2 (val)) > 0 && p2 <= 4) {
+ if ((p2 = PowerOf2 (val)) > 0 && p2 <= 4) {
/* Factor is 2, 4, 8 and 16 use special function */
switch (flags & CF_TYPE) {
int p2;
/* Do strength reduction if the value is constant and a power of two */
- if (flags & CF_CONST && (p2 = powerof2 (val)) >= 0) {
+ if (flags & CF_CONST && (p2 = PowerOf2 (val)) >= 0) {
/* Generate a shift instead */
g_asl (flags, p2);
return;
/* Do strength reduction if the value is constant and a power of two */
int p2;
- if ((flags & CF_CONST) && (p2 = powerof2 (val)) >= 0) {
+ if ((flags & CF_CONST) && (p2 = PowerOf2 (val)) >= 0) {
/* Generate a shift instead */
g_asr (flags, p2);
} else {
int p2;
/* Check if we can do some cost reduction */
- if ((flags & CF_CONST) && (flags & CF_UNSIGNED) && val != 0xFFFFFFFF && (p2 = powerof2 (val)) >= 0) {
+ if ((flags & CF_CONST) && (flags & CF_UNSIGNED) && val != 0xFFFFFFFF && (p2 = PowerOf2 (val)) >= 0) {
/* We can do that with an AND operation */
g_and (flags, val - 1);
} else {
-/*
+/*
* C pre-processor functions.
- * Portions of this code are copyright (C) 1989 John R. Dunning.
+ * Portions of this code are copyright (C) 1989 John R. Dunning.
* See copyleft.jrd for license information.
*/
-
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "preproc.h"
#include "scanner.h"
#include "standard.h"
-#include "util.h"