diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-12-08 11:52:02 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-12-08 11:52:02 -0800 |
commit | 7e42b753e7cc03bf7271dfc98e69aa56973df9ba (patch) | |
tree | c35aa84c5bc0754553b8c190265cd5d7593fdeaa /src/mem/slicc/ast | |
parent | f26051eb1a5b8f3522acbb871133de66278fd517 (diff) | |
download | gem5-7e42b753e7cc03bf7271dfc98e69aa56973df9ba.tar.xz |
ruby: remove Ruby asserts for m5.fast
This diff is for changing the way ASSERT is handled in Ruby. m5.fast
compiles out the assert statements by using the macro NDEBUG. Ruby uses the
macro RUBY_NO_ASSERT to do so. This macro has been removed and NDEBUG has
been put in its place.
Diffstat (limited to 'src/mem/slicc/ast')
-rw-r--r-- | src/mem/slicc/ast/FuncCallExprAST.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mem/slicc/ast/FuncCallExprAST.py b/src/mem/slicc/ast/FuncCallExprAST.py index 830b10c21..829203d53 100644 --- a/src/mem/slicc/ast/FuncCallExprAST.py +++ b/src/mem/slicc/ast/FuncCallExprAST.py @@ -165,9 +165,11 @@ class FuncCallExprAST(ExprAST): elif self.proc_name == "assert": error = self.exprs[0].embedError('"assert failure"') code(''' -if (ASSERT_FLAG && !(${{cvec[0]}})) { +#ifndef NDEBUG +if (!(${{cvec[0]}})) { $error } +#endif ''') elif self.proc_name == "continueProcessing": |