This is the mail archive of the gcc-bugs@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]

[Bug target/39472] Add -mabi=[ms|sysv]



------- Comment #4 from hjl dot tools at gmail dot com  2009-03-17 19:17 -------
(In reply to comment #3)
> Is it really so hard to change UEFI apps?

You can take a look at testcases in gcc.target/x86_64/abi/callabi.
They have to use macros, like

---
static
void CALLABI_CROSS do_cpy (char *s, ...)
{
  CROSS_VA_LIST argp;
  CROSS_VA_START (argp, s);
  vdo_cpy (s, argp);
  CROSS_VA_END (argp);
}
---

With -mabi=, we can have normal C codes, like

void
do_cpy (char *s, ...)
{
  va_list argp;
  va_start (argp, s);
  vdo_cpy (s, argp);
  va_end (argp);
}

> The thing is that by adding the -mabi= option you pessimize x86_64 gcc even
> more than the attribute patches have done.  Now at least DEFAULT_ABI ==
> SYSV_ABI
> or DEFAULT_ABI != SYSV_ABI can be optimized into a constant at compile time,
> with your patch it can't.

On Fedora 9/Intel Core i7, before my change, I got

5336.28user 431.05system 19:46.59elapsed 486%CPU (0avgtext+0avgdata
0maxresident)k

for bootstrap and

8133.98user 2054.99system 43:25.49elapsed 391%CPU (0avgtext+0avgdata
0maxresident)k

for "make check" for both 32bit and 64bit with all default languages.
After my change, I got

5090.92user 411.23system 18:40.23elapsed 491%CPU (0avgtext+0avgdata
0maxresident)k

for "make check" for both 32bit and 64bit with all default languages.

8140.67user 2074.77system 43:25.89elapsed 392%CPU (0avgtext+0avgdata
0maxresident)k

I don't see a big difference in compiler performance.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39472


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