Skip to content

[BUG] Float operations use integer arithmetic #38

Description

@Prestgg1

Issue

In the transpiler, all arithmetic operations use w (word/integer) type:

"%bin{} = w add {},{}" // always integer arithmetic

Float operations should use f (float) type but currently are not distinguished.

Example

const float d = 2/2  // Should be 1.0, might be 1 (int)

Problem

The SSA generation does not differentiate between integer and float operations:

  • w add instead of f add for floats
  • No float literal handling in data section

Files

  • crates/transpiler/src/lib.rs
  • Type system needs float operation codes

Labels: bug, type-system, compiler

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions