Skip to content

Instantly share code, notes, and snippets.

View jroelofs's full-sized avatar

Jon Roelofs jroelofs

View GitHub Profile
@jroelofs
jroelofs / test_wrapper.cc
Created December 9, 2014 21:11
Wrapper for semihosted QEMU tests
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
extern "C" {
int on_exit(void (*function)(int , void *), void *arg);
static void register_printers() __attribute__ ((constructor));
static void exit_status_printer(int i, void* a);
static void signal_printer(int sig);
//===--------------------------- Unwind-arm.c ----------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//
// Implements ARM zero-cost C++ exceptions
//
@jroelofs
jroelofs / gist:cc05549e8028c82ec252
Created August 26, 2014 23:45
locale_android.cpp
// -*- C++ -*-
//===-------------------- support/win32/locale_win32.cpp ------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
commit 65481e4038c37dc63d068889903640423e5782d4
Author: Jonathan Roelofs <[email protected]>
Date: Thu Aug 14 11:39:23 2014 -0600
[libcxx] Add Newlib's version of ELAST to libcxx/src/ios.cpp
diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp
index a762a07..c1f83e0 100644
--- a/libcxx/src/ios.cpp
+++ b/libcxx/src/ios.cpp
commit c77d06fe25dbaf137083db2eb2a590ea5f72d4c9
Author: Jonathan Roelofs <[email protected]>
Date: Thu Aug 14 11:38:18 2014 -0600
[libcxx] Fix diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp
index d5cb2d4..96a9736 100644
--- a/libcxx/src/system_error.cpp
+++ b/libcxx/src/system_error.cpp
commit 0cb5f0beda174e9fae584b90c940d443cfa89a8e
Author: Jonathan Roelofs <[email protected]>
Date: Thu Aug 14 12:59:50 2014 -0600
[libcxx] Newlib's isprint mask isn't a single bit. Test masking appropriately.
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index d0819ee..4256419 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
diff --git a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
index baa97a7..a30dfdd 100644
--- a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
+++ b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
@@ -463,6 +463,7 @@ restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
MachineInstrBuilder MIB = BuildMI(MF, DL, TII.get(ARM::tPOP));
AddDefaultPred(MIB);
+ bool IsReturn = false;
bool NumRegs = false;
commit ab92dc0425517575ae49f4771516da15806ffb1a
Author: Jonathan Roelofs <[email protected]>
Date: Tue Jun 3 12:11:40 2014 -0600
Fix awkward macro clash with newlib
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/include/cmath b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath
index 964c672..d6897f4 100644
--- a/sources/cxx-stl/llvm-libc++/libcxx/include/cmath
+++ b/sources/cxx-stl/llvm-libc++/libcxx/include/cmath
#include <stdio.h>
int main() {
int Cpsr = 0x40000173;
int armflag_N = (Cpsr >> 31) & 1;
int armflag_Z = (Cpsr >> 30) & 1;
int armflag_C = (Cpsr >> 29) & 1;
int armflag_V = (Cpsr >> 28) & 1;
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp (revision 209242)
+++ lib/Basic/Targets.cpp (working copy)
@@ -3751,7 +3751,8 @@
if (!T.isOSLinux() &&
T.getOS() != llvm::Triple::FreeBSD &&
T.getOS() != llvm::Triple::NetBSD &&
- T.getOS() != llvm::Triple::Bitrig)