public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to suppress the generation of float point instructions?
@ 2007-01-08  8:48 Ender.Dai
  2007-01-08 10:25 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Ender.Dai @ 2007-01-08  8:48 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to suppress the generation of float point instructions?
  2007-01-08  8:48 How to suppress the generation of float point instructions? Ender.Dai
@ 2007-01-08 10:25 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2007-01-08 10:25 UTC (permalink / raw)
  To: Ender.Dai; +Cc: gcc-help

> 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?

-msoft-float .  This flag is set by the PowerPC Linux
build system automatically already.


Segher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-08 10:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-08  8:48 How to suppress the generation of float point instructions? Ender.Dai
2007-01-08 10:25 ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).