From 952ed5d5049462c60abf4149ee0ddbcb9cdb8cdc Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Fri, 18 Sep 2020 02:25:20 +0200 Subject: [BROKEN] Start implementing better support for addressable arguments --- ptx/src/ast.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'ptx/src/ast.rs') 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 { 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 { pub src: P::Operand, } +pub struct Arg2Ld { + pub dst: P::ID, + pub src: P::MemoryOperand, +} + pub struct Arg2St { - pub src1: P::Operand, + pub src1: P::MemoryOperand, pub src2: P::Operand, } @@ -416,13 +423,13 @@ pub struct Arg5 { pub enum Operand { Reg(ID), RegOffset(ID, i32), - Imm(i128), + Imm(u32), } #[derive(Copy, Clone)] pub enum CallOperand { Reg(ID), - Imm(i128), + Imm(u32), } pub enum VectorPrefix { -- cgit v1.2.3