Page MenuHomePhabricator

mneumann (Michael Neumann)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 29 2014, 6:09 AM (326 w, 3 d)

Recent Activity

Dec 27 2014

mneumann updated the diff for D4705: Add segmented stack support for DragonFlyBSD.

clang-formatted version

Dec 27 2014, 1:50 AM

Dec 13 2014

mneumann updated the diff for D4705: Add segmented stack support for DragonFlyBSD.

Add codegen test cases and fix a bug in the X32 generation.

Dec 13 2014, 8:38 AM

Aug 6 2014

mneumann added a comment to D4705: Add segmented stack support for DragonFlyBSD.

Am 29.07.2014 um 15:20 schrieb Michael Neumann:

This patch adds support for segmented stacks for DragonFlyBSD. It is required to port the Rust programming language to DragonFly. With this patch rustc can generate code targeted at DragonFly.

http://reviews.llvm.org/D4705

Files:

lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86Subtarget.h

Index: lib/Target/X86/X86FrameLowering.cpp

  • lib/Target/X86/X86FrameLowering.cpp

+++ lib/Target/X86/X86FrameLowering.cpp
@@ -1328,7 +1328,8 @@

if (MF.getFunction()->isVarArg())
  report_fatal_error("Segmented stacks do not support vararg functions.");
if (!STI.isTargetLinux() && !STI.isTargetDarwin() &&
  • !STI.isTargetWin32() && !STI.isTargetWin64() && !STI.isTargetFreeBSD())

+ !STI.isTargetWin32() && !STI.isTargetWin64() &&
+ !STI.isTargetFreeBSD() && !STI.isTargetDragonFly())

  report_fatal_error("Segmented stacks not supported on this platform.");

// Eventually StackSize will be calculated by a link-time pass; which will

@@ -1382,6 +1383,9 @@

} else if (STI.isTargetFreeBSD()) {
  TlsReg = X86::FS;
  TlsOffset = 0x18;

+ } else if (STI.isTargetDragonFly()) {
+ TlsReg = X86::FS;
+ TlsOffset = 0x20; // use tls_tcb.tcb_segstack

} else {
  report_fatal_error("Segmented stacks not supported on this platform.");
}

@@ -1404,6 +1408,9 @@

} else if (STI.isTargetWin32()) {
  TlsReg = X86::FS;
  TlsOffset = 0x14; // pvArbitrary, reserved for application use

+ } else if (STI.isTargetDragonFly()) {
+ TlsReg = X86::FS;
+ TlsOffset = 0x10; // use tls_tcb.tcb_segstack

} else if (STI.isTargetFreeBSD()) {
  report_fatal_error("Segmented stacks not supported on FreeBSD i386.");
} else {

Index: lib/Target/X86/X86Subtarget.h

  • lib/Target/X86/X86Subtarget.h

+++ lib/Target/X86/X86Subtarget.h
@@ -371,6 +371,9 @@

bool isTargetFreeBSD() const {
  return TargetTriple.getOS() == Triple::FreeBSD;
}

+ bool isTargetDragonFly() const {
+ return TargetTriple.getOS() == Triple::DragonFly;
+ }

bool isTargetSolaris() const {
  return TargetTriple.getOS() == Triple::Solaris;
}
Aug 6 2014, 3:15 AM

Aug 4 2014

mneumann added a reviewer for D4705: Add segmented stack support for DragonFlyBSD: deleted.
Aug 4 2014, 12:46 AM

Jul 29 2014

mneumann retitled D4705: Add segmented stack support for DragonFlyBSD from to Add segmented stack support for DragonFlyBSD.
Jul 29 2014, 6:20 AM