implement the power operator #50

Closed
opened 2021-10-03 17:36:49 +08:00 by sb10q · 5 comments
Owner
@extern
def output_int(x: int32):
    ...

@kernel
def run() -> int32:
    output_int(2**4)
    return 0
thread '<unnamed>' panicked at 'not implemented', nac3core/src/codegen/expr.rs:338:30
```python @extern def output_int(x: int32): ... @kernel def run() -> int32: output_int(2**4) return 0 ``` ``` thread '<unnamed>' panicked at 'not implemented', nac3core/src/codegen/expr.rs:338:30 ```
ychenfo was assigned by sb10q 2021-11-05 17:21:46 +08:00
sb10q added this to the Prealpha milestone 2021-11-19 16:50:27 +08:00
sb10q removed this from the Prealpha milestone 2021-11-19 16:52:51 +08:00
Author
Owner
Check for this bug: https://github.com/m-labs/artiq/issues/1505
Author
Owner

Done in nac3artiq. @ychenfo can I leave it to you to send another PR that implements the same linking system from nac3artiq in nac3standalone (output a single .o via link_module in LLVM) and the demos, and adds IRRT there? This is the only missing bit.

Done in nac3artiq. @ychenfo can I leave it to you to send another PR that implements the same linking system from nac3artiq in nac3standalone (output a single .o via link_module in LLVM) and the demos, and adds IRRT there? This is the only missing bit.
Author
Owner

There's also a problem with the nix build. https://nixbld.m-labs.hk/build/91917/nixlog/2

There's also a problem with the nix build. https://nixbld.m-labs.hk/build/91917/nixlog/2
sb10q added this to the Prealpha milestone 2022-01-08 22:35:05 +08:00
Collaborator

Done in nac3artiq. @ychenfo can I leave it to you to send another PR that implements the same linking system from nac3artiq in nac3standalone (output a single .o via link_module in LLVM) and the demos, and adds IRRT there? This is the only missing bit.

Thanks, I will implement the nac3artiq linking system in nac3core.

There's also a problem with the nix build. https://nixbld.m-labs.hk/build/91917/nixlog/2

Sorry I think it's because I forgot to add clang to nix nativeBuildInputs(should I add it to somewhere else?). One issue related to this is that should we use unwrapped clang here so that we can specify the target to be 32bit to prevent clang from generating some zexts from i32 to i64 for some gep indecies?

> Done in nac3artiq. @ychenfo can I leave it to you to send another PR that implements the same linking system from nac3artiq in nac3standalone (output a single .o via link_module in LLVM) and the demos, and adds IRRT there? This is the only missing bit. Thanks, I will implement the nac3artiq linking system in nac3core. > There's also a problem with the nix build. https://nixbld.m-labs.hk/build/91917/nixlog/2 Sorry I think it's because I forgot to add clang to nix `nativeBuildInputs`(should I add it to somewhere else?). One issue related to this is that should we use unwrapped clang here so that we can specify the target to be 32bit to prevent clang from generating some `zext`s from `i32` to `i64` for some `gep` indecies?
Author
Owner

clang wrapped was only necessary for demo.c. I rewrote it in Rust.

clang wrapped was only necessary for demo.c. I rewrote it in Rust.
sb10q closed this issue 2022-01-09 11:32:52 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#50
No description provided.