This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to suppress the generation of float point instructions?


Hi, all,

Following demo code will generate float point instruction "lfd" by
compile it with command "powerpc-linux-uclibc-gcc demo.c -S". Since
the actual working code is a part of linux kernel,  I just wanna
suppress the generation of float point instructions. Is there any
way(some gcc flags for example) to finish this job? Thanks in advance.

#include <stdio.h>

#define SIZE 2

typedef struct {
 int arr[SIZE];
} arr_s;

int printArr(arr_s var)
{
 int i;
 for(i=0; i<SIZE; i++) {
   printf("var.arr[%d] = %d\n", i, var.arr[i]);
 }
 return 0;
}

int main()
{
 arr_s parm = { 1, 2 };
 return printArr(parm);
}


-- Invent and fit; have fits and reinvent! We toast the Lisp programmer who pens his thoughts within nests of parentheses.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]