Skip to content

Conversation

@SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Nov 20, 2025

Pulling on the thread of NYIs a bit further. We now have this for my Problem(int a, int b) => a + b;:

Scope info: begin block BB01, IL range [000..004)
Added IP mapping: 0x0000 STACK_EMPTY (G_M56520_IG02,ins#0,ofs#0) label
Generating:                [000004] -----------                            IL_OFFSET void   INLRT @ 0x000[E--]
Generating: N001 (  1,  1) [000000] -----+-----                    t0 =    LCL_VAR   int    V00 arg0         u:1 (last use) $80
Mapped BB01 to G_M56520_IG02
IN0001:             i32.load 1 4
Debug: Closing V00 debug range.
                                                        Live vars after [000000]: {V00 V01} -{V00} => {V01}
Generating: N002 (  1,  1) [000001] -----+-----                    t1 =    LCL_VAR   int    V01 arg1         u:1 (last use) $81
IN0002:             i32.load 1 0
Debug: Closing V01 debug range.
                                                        Live vars after [000001]: {V01} -{V01} => {}
                                                                        /--*  t0     int
                                                                        +--*  t1     int
Generating: N003 (  3,  3) [000002] -----+-----                    t2 = *  ADD       int    $100
IN0003:             i32.add
                                                                        /--*  t2     int
Generating: N004 (  4,  4) [000003] -----+-----                         *  RETURN    int    $VN.Void

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 20, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 20, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@SingleAccretion SingleAccretion force-pushed the WasmJit3 branch 2 times, most recently from 51223ba to 850a98a Compare November 21, 2025 00:02
@AndyAyersMS
Copy link
Member

FYI @kg -- start of some emitter work for WASM.

cc @dotnet/jit-contrib

@SingleAccretion SingleAccretion marked this pull request as ready for review November 21, 2025 16:42
@SingleAccretion
Copy link
Contributor Author

@dotnet/jit-contrib

Comment on lines +82 to +84
case GT_ADD:
genCodeForBinary(treeNode->AsOp());
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future is it possible for this sort of thing to be table-driven, by looking up the AsOp() value in a table optimistically? Or do you think we'll need a big switch?

break;

case GT_IL_OFFSET:
// Do nothing; this node is a marker for debug info.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we eventually want to do something with this node once we start generating DWARF debug info?

Comment on lines +157 to +158
GetEmitter()->emitIns_S(ins_Load(type), emitTypeSize(tree), tree->GetLclNum(), 0);
genProduceReg(tree);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have expected to see an emit with a memarg here, am I misunderstanding what this does?

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

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants