This is an archive of the discontinued LLVM Phabricator instance.

[Sparc] __builtin_setjmp / __builtin_longjmp implementation for 32-bit Sparc.
ClosedPublic

Authored by lero_chris on May 2 2016, 2:47 AM.

Details

Summary

This code implements builtin_setjmp and builtin_longjmp exception handling intrinsics for 32-bit Sparc back-ends.

The code started as a mash-up of the PowerPC and X86 versions, although there are sufficient differences to both that had to be made for Sparc handling.

Note: I have manual tests running. I'll work on a unit test and add that to the rest of this diff in the next day.

Also, this implementation is only for 32-bit Sparc. I haven't focussed on a 64-bit version, although I have left the code in a prepared state for implementing this, including detecting pointer size and comments indicating where I suspect there may be differences.

Diff Detail

Repository
rL LLVM

Event Timeline

lero_chris updated this revision to Diff 55793.May 2 2016, 2:47 AM
lero_chris retitled this revision from to [Sparc] __builtin_setjmp / __builtin_longjmp implementation for 32-bit Sparc..
lero_chris updated this object.
lero_chris added reviewers: jyknight, hfinkel.
lero_chris set the repository for this revision to rL LLVM.
lero_chris updated this revision to Diff 55962.May 3 2016, 3:18 AM
lero_chris removed rL LLVM as the repository for this revision.

Made some code modifications, mostly in comments, plus removing redundant code that accidentally made the last check-in.

Added unit test for behaviour, testing targets with different itineraries to ensure that the instruction timings do not affect behaviour.

lero_chris set the repository for this revision to rL LLVM.May 3 2016, 3:19 AM
This revision was automatically updated to reflect the committed changes.