Coder Social home page Coder Social logo

gcnasm's People

Contributors

balidani avatar matszpk avatar sayan1an avatar ukasz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcnasm's Issues

Add VGPR range check when accessing VGPRs

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.

IO Error handling

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);
(...)

  1. 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.

  2. 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?

VOP1, V_MOV_B32

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.

VOPC as a part of VOP3B fails.

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

Add checks to SMRD SGPR ranges

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.

Support VOP1/2 being used as VOP3a/b

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.

Add concerns section to readme

We should have section with listed stuff that is not yet implemented/supported.
Maybe you can find better name for that.

Support VINTRP and EXP formats

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.

Error handling

  • if (ssrc0_op.op_type.type == VGPR)
  • ERROR("incorrect value for SSRC0 operand");

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.