diff options
author | Andrzej Janik <[email protected]> | 2020-09-18 02:25:20 +0200 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2020-09-18 02:25:20 +0200 |
commit | 952ed5d5049462c60abf4149ee0ddbcb9cdb8cdc (patch) | |
tree | 138e409c3ec519602bed55521efdacdfd3d86963 /ptx/src/ast.rs | |
parent | 42bad8fcc22d3fd66bcdbfea7ce9a41268772e50 (diff) | |
download | ZLUDA-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.rs | 13 |
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 { |