Commit Graph

12 Commits (fff625767cd7411f570d73575aa81aef2ae6c48e)

Author SHA1 Message Date
Amanieu d'Antras fff625767c Clean up and simplify the implementation of generators 2016-09-09 10:59:35 -04:00
Amanieu d'Antras f7f209c1eb Add proper CFI annotations to the inline asm
This ensures that gdb is able to generate a correct backtrace when
stopped at any instruction in the inline asm.

It also makes backtraces accessible to tools that only track frame
pointer chains, like perf or dtrace.

close #49
2016-09-09 10:59:19 -04:00
whitequark 491af39fc9 Radically simplify stack linking.
This commit:

  * Gets rid of 2nd init trampoline.
  * Gets rid of any custom CFI, instead using the standard CFI
    for target prologue.
  * Makes backtraces accessible to tools that only track frame
    pointer chains, like perf or dtrace.
  * Keeps the performance at the exact same level.
2016-09-04 07:18:55 -04:00
Amanieu d'Antras b1f5b7458f Pass the new stack pointer by value into the swap trampoline 2016-09-04 02:13:46 -04:00
Amanieu d'Antras 86e29b2baa Remove unnecessary "memory" clobbers for naked function asm 2016-09-04 02:13:46 -04:00
Amanieu d'Antras fb9acb73f3 Use raw pointers instead of references to avoid aliasing issues 2016-09-04 02:13:46 -04:00
whitequark c6ece101e2 Expose fringe::STACK_ALIGNMENT, and make OwnedStack respect it. 2016-09-02 19:44:34 -04:00
whitequark a733290359 arch: bring back clobbers for input operands.
This reverts a part of 365e40b. While it is not legal to clobber
the output register, it is legal and necessary to do this for inputs,
since we do not preserve them, and LLVM could have decided to
reuse them.

Thanks to @Amanieu for discovering this.
2016-08-31 14:17:54 -04:00
whitequark 248d7b16b5 arch/or1k: fix typo. 2016-08-31 14:17:54 -04:00
whitequark 2d8cefcabc Do not simultaneously clobber registers passed into assembly.
This is not actually legal (although the restriction is not
documented anywhere), and is not caught by LLVM unless the codegen
option -verify-machineinstrs is specified. This option is now used
on Travis.

While not legal, this does not seem to result in invalid output
(although it creates an unnecessary spill); however, under extremely
specific circumstances (e.g. when a register scavenger is run under
severe pressure), this will result in a codegen crash, which is
how I found it.
2016-08-30 12:20:34 -04:00
edef f21b8dc936 Update the license headers for MIT/Apache 2016-08-20 23:45:01 +02:00
whitequark e0ad79ea0c Add an OR1K port. 2016-08-19 15:12:42 +02:00