Re: [OS-BUILD PATCHv3 0/5] ark: Set Architecture Level Set to Z14 for s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Florian Weimer on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1144#note_598979089

Current GCC compiles this code to use the `msrkc` instruction:

```c
#include <stdlib.h>

int
f (int a, int b)
{
  int result;
  if (__builtin_mul_overflow (a, b, &result))
    abort ();
  return result;
}

int
main (int argc, char **argv)
{
  return f (atoi (argv[1]), atoi (argv[2]));
}
```

Maybe not exactly common, but also not super-obscure.  I think the kernel uses
`__builtin_mul_overflow` in some places.  `s390.md` in GCC has patterns for
the other instructions, too, search for `TARGET_Z14`.

The sort-of working aspect was the reason why I added the run-time check to
glibc.  I was worried that without it, some z14 binaries will appear to work,
but crash in obscure ways for some operations because GCC happened to emit one
of the new instructions.
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux