summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCExpr.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-02-08 23:58:47 +0000
committerDan Gohman <gohman@apple.com>2010-02-08 23:58:47 +0000
commit036c130e90eb5c93b0dc0a70ad07b9343623c2a8 (patch)
tree5f4861b1fc9be3031683bb2715d064c126d57fec /include/llvm/MC/MCExpr.h
parent8609fda0f7e4446de85f882755601ffcbd540324 (diff)
downloadllvm-036c130e90eb5c93b0dc0a70ad07b9343623c2a8.tar.gz
llvm-036c130e90eb5c93b0dc0a70ad07b9343623c2a8.tar.bz2
llvm-036c130e90eb5c93b0dc0a70ad07b9343623c2a8.tar.xz
Document that MCExpr::Mod is actually remainder.
Document that MCExpr::Div, Mod, and the comparison operators are all signed operators. Document that the comparison operators' results are target-dependent. Document that the behavior of shr is target-dependent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCExpr.h')
-rw-r--r--include/llvm/MC/MCExpr.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h
index 04eeb6666a..afc90d910b 100644
--- a/include/llvm/MC/MCExpr.h
+++ b/include/llvm/MC/MCExpr.h
@@ -202,20 +202,24 @@ public:
enum Opcode {
Add, ///< Addition.
And, ///< Bitwise and.
- Div, ///< Division.
+ Div, ///< Signed division.
EQ, ///< Equality comparison.
- GT, ///< Greater than comparison.
- GTE, ///< Greater than or equal comparison.
+ GT, ///< Signed greater than comparison (result is either 0 or some
+ ///< target-specific non-zero value)
+ GTE, ///< Signed greater than or equal comparison (result is either 0 or
+ ///< some target-specific non-zero value).
LAnd, ///< Logical and.
LOr, ///< Logical or.
- LT, ///< Less than comparison.
- LTE, ///< Less than or equal comparison.
- Mod, ///< Modulus.
+ LT, ///< Signed less than comparison (result is either 0 or
+ ///< some target-specific non-zero value).
+ LTE, ///< Signed less than or equal comparison (result is either 0 or
+ ///< some target-specific non-zero value).
+ Mod, ///< Signed remainder.
Mul, ///< Multiplication.
NE, ///< Inequality comparison.
Or, ///< Bitwise or.
- Shl, ///< Bitwise shift left.
- Shr, ///< Bitwise shift right.
+ Shl, ///< Shift left.
+ Shr, ///< Shift right (arithmetic or logical, depending on target)
Sub, ///< Subtraction.
Xor ///< Bitwise exclusive or.
};