balidani / gcnasm Goto Github PK
View Code? Open in Web Editor NEWGCN ISA assembler tool for my GSoC project at Openwall
GCN ISA assembler tool for my GSoC project at Openwall
It would be useful if the user could specify the number of available VGPRs on the device they use. If an instruction tried to use a VGPR out of range, the assembler would display a warning.
parser.c:
if (in_file == NULL)
ERROR("opening file "%s"", input);
(...)
if (out_file == NULL)
ERROR("opening file "%s"", output);
(...)
if (fwrite(&src, sizeof(uint32_t), 1, out_file) == 0)
ERROR("writing file "%s"", output);
(...)
In every IO error we should print last error message, to know whether we don't have rights to access file or disk is full or something else happend.
Why not use fseek function instead of close/open?
3)microcode = (uint32_t *) calloc((size_t) line_count * 2,
sizeof (uint32_t));
Do you support more than 1 instruction per line?
V_MOV_B32 v1, 11
V_MOV_B32 v0, v1
The above instructions doesn't work as expected. Output contains previous value of v0.
However the following works,
V_MOV_B32 v2, 11
V_MOV_B32 v0, v2
Output is 11 for all threads.
v_cmp_lt_i32 s[5:6], v0, 48 // 00000028: D1020002 00016100
The above instruction produce invalid output. Please note that the above instruction is in VOP3b format. The instruction can be emulated as follows:
V_MOV_B32 v4, 48
V_CMP_LT_I32 v0, v4 // Using VOPC format
S_MOV_B64 s[5:6], vcc
Currently the range is unchecked for SGPR operands. For example when somebody uses s[4:7], only the value 4 is being used, regardless of the end of range.
If the user's intent is different, and they try to use a larger range than the instruction accepts, a warning should be displayed.
Especially for OpenCL code.
Currently this is not supported. It might be difficult to tell which format to use, it can't be decided solely based on the number of operands passed.
For example:
v_add_i32 v8, vcc, v3, v7 ; 4A100F03
This instruction specifies "vcc" as the destination for the carry-out, which a VOP2 instruction wouldn't be allowed to do. Since "vcc" is the default though, this probably gets optimized and the output is in VOP2 format.
We should have section with listed stuff that is not yet implemented/supported.
Maybe you can find better name for that.
These don't seem very important yet, but they may be in the future.
The problem with VINTRP is the lack of documentation for the operand format.
This is available in .il but not in .isa. We need to find a way to access this data from isa level.
We need better way of handling errors and warnings in asm - a way that will tell the programmer what went wrong and where exactly (line number:line of code). Implementation of it should be separated from handling problems with gcnasm. Also we should group errors and warnings into types and store them in a separate file otherwise it will be mess when programmer will see slightly different messages for the same error but printed in a different way.
This is needed for manual inspection.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.