summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-12-08 11:52:02 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-12-08 11:52:02 -0800
commit7e42b753e7cc03bf7271dfc98e69aa56973df9ba (patch)
treec35aa84c5bc0754553b8c190265cd5d7593fdeaa /src/mem/slicc/ast
parentf26051eb1a5b8f3522acbb871133de66278fd517 (diff)
downloadgem5-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.py4
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":