aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx/src/ast.rs
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2020-09-18 02:25:20 +0200
committerAndrzej Janik <[email protected]>2020-09-18 02:25:20 +0200
commit952ed5d5049462c60abf4149ee0ddbcb9cdb8cdc (patch)
tree138e409c3ec519602bed55521efdacdfd3d86963 /ptx/src/ast.rs
parent42bad8fcc22d3fd66bcdbfea7ce9a41268772e50 (diff)
downloadZLUDA-952ed5d5049462c60abf4149ee0ddbcb9cdb8cdc.tar.gz
ZLUDA-952ed5d5049462c60abf4149ee0ddbcb9cdb8cdc.zip
[BROKEN] Start implementing better support for addressable arguments
Diffstat (limited to 'ptx/src/ast.rs')
-rw-r--r--ptx/src/ast.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/ptx/src/ast.rs b/ptx/src/ast.rs
index 9214944..7ac9d18 100644
--- a/ptx/src/ast.rs
+++ b/ptx/src/ast.rs
@@ -354,6 +354,7 @@ pub struct CallInst<P: ArgParams> {
pub trait ArgParams {
type ID;
type Operand;
+ type MemoryOperand;
type CallOperand;
type VecOperand;
}
@@ -365,6 +366,7 @@ pub struct ParsedArgParams<'a> {
impl<'a> ArgParams for ParsedArgParams<'a> {
type ID = &'a str;
type Operand = Operand<&'a str>;
+ type MemoryOperand = Operand<&'a str>;
type CallOperand = CallOperand<&'a str>;
type VecOperand = (&'a str, u8);
}
@@ -378,8 +380,13 @@ pub struct Arg2<P: ArgParams> {
pub src: P::Operand,
}
+pub struct Arg2Ld<P: ArgParams> {
+ pub dst: P::ID,
+ pub src: P::MemoryOperand,
+}
+
pub struct Arg2St<P: ArgParams> {
- pub src1: P::Operand,
+ pub src1: P::MemoryOperand,
pub src2: P::Operand,
}
@@ -416,13 +423,13 @@ pub struct Arg5<P: ArgParams> {
pub enum Operand<ID> {
Reg(ID),
RegOffset(ID, i32),
- Imm(i128),
+ Imm(u32),
}
#[derive(Copy, Clone)]
pub enum CallOperand<ID> {
Reg(ID),
- Imm(i128),
+ Imm(u32),
}
pub enum VectorPrefix {