This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "sci.hpp" | |
#include <stddef.h> | |
#define set_imask_ccr(b) (b ? ({asm volatile ("orc #0x80, ccr");}) : ({asm volatile ("andc #0x7F, ccr");})) | |
#define get_imask_ccr() ({ unsigned char __r; asm volatile ("stc.b ccr, %s0": "=r"(__r)); !!(__r&0x80); }) | |
struct lock_interrupt { | |
__attribute__((always_inline)) lock_interrupt() : masked(get_imask_ccr()) { | |
set_imask_ccr(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <setjmp.h> | |
#define SET_STACK(stack) asm("movl %0, %%esp": : "r"(stack)) | |
//#define SET_STACK(stack) asm("mov %0, sp" : : "r"(stack)); | |
template <typename FnctrT> | |
struct coroutine { | |
int operator ()() { | |
if (volatile int n = setjmp(jb_outer)) { | |
return n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <array> | |
#include <chrono> | |
#include <functional> | |
#include <iostream> | |
#include <memory> | |
#include <numeric> | |
#include <random> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pstade/egg/detail/little_indirect_result.hpp b/pstade/egg/detail/little_indirect_result.hpp | |
old mode 100644 | |
new mode 100755 | |
index 4785954..bf2cfeb | |
--- a/pstade/egg/detail/little_indirect_result.hpp | |
+++ b/pstade/egg/detail/little_indirect_result.hpp | |
@@ -45,8 +45,8 @@ namespace pstade { namespace egg { namespace detail { | |
} | |
// 0ary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
#include <iostream> | |
namespace cts { // compile time string | |
using std::size_t; | |
template <size_t From, typename charT, size_t N1, size_t N2> | |
struct eq_helper { | |
static constexpr int exec(const charT (&s1)[N1], const charT (&s2)[N2]) { | |
return s1[From]<s2[From] ? -1 : s2[From]<s1[From] ? 1 : eq_helper<From+1, charT, N1, N2>::exec(s1, s2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/gcc/cp/class.c | |
+++ b/gcc/cp/class.c | |
@@ -3226,6 +3226,22 @@ check_field_decls (tree t, tree *access_decls, | |
warning (OPT_Weffc__, | |
" but does not override %<operator=(const %T&)%>", t); | |
} | |
+ if (cxx_dialect >= cxx0x | |
+ && (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) | |
+ || type_has_move_constructor (t) || type_has_move_assign (t)) | |
+ && !(TYPE_HAS_COPY_CTOR (t) && TYPE_HAS_COPY_ASSIGN (t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/gcc/cp/class.c | |
+++ b/gcc/cp/class.c | |
@@ -3226,6 +3226,22 @@ check_field_decls (tree t, tree *access_decls, | |
warning (OPT_Weffc__, | |
" but does not override %<operator=(const %T&)%>", t); | |
} | |
+ if (cxx_dialect >= cxx0x | |
+ && (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) | |
+ || type_has_move_constructor (t) || type_has_move_assign (t)) | |
+ && !(TYPE_HAS_COPY_CTOR (t) && TYPE_HAS_COPY_ASSIGN (t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TRIBOOL_HPP | |
#define TRIBOOL_HPP | |
#include <boost/config.hpp> | |
namespace logic { | |
struct indeterminate_t; | |
struct tribool { | |
enum tribool_value_t { | |
false_value = false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c | |
index 44d60f6..56ecf3b 100644 | |
--- a/sim/h8300/compile.c | |
+++ b/sim/h8300/compile.c | |
@@ -37,6 +37,9 @@ | |
#ifndef SIGTRAP | |
# define SIGTRAP 5 | |
#endif | |
+#ifndef SIGBUS | |
+# define SIGBUS 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <type_traits> | |
template <typename U, typename ...Args> | |
struct make_array_impl_ { | |
template <typename T, typename Void, typename NonVoid> | |
struct if_void_else { typedef NonVoid type; }; | |
template <typename Void, typename NonVoid> | |
struct if_void_else<void, Void, NonVoid> { typedef Void type; }; | |
template <typename T = void, typename ElemT = typename if_void_else<T, U, T>::type > |