On Sun, Feb 16, 2014 at 7:10 AM, Herman Hermitage < hermanhermitage@xxxxxxxxxxx> wrote: > Ok, > > I've added support for constant 2-bit vectors and rotator on the mul > sources: > > /* Assembled Program */ > /* 0x00000000: */ 0x00000000, 0xe6020827, /* ldi r0, > [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] */ > /* 0x00000008: */ 0x00001111, 0xe6020827, /* ldi r0, > [1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0] */ > /* 0x00000010: */ 0x0000ffff, 0xe6020827, /* ldi r0, > [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] */ > /* 0x00000018: */ 0xffff0000, 0xe6020827, /* ldi r0, > [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] */ > /* 0x00000020: */ 0xedb65b6d, 0xe6020827, /* ldi r0, > [1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,2] */ > /* 0x00000028: */ 0x00030000, 0xe2020827, /* ldi r0, [-2, -2, 0, 0, > 0,0,0,0,0,0,0,0,0,0,0,0] */ > /* 0x00000030: */ 0x809f4009, 0xd00049e0, /* nop; mov r0, r1>> 4 */ > /* 0x00000038: */ 0x809f0009, 0xd00049e0, /* nop; mov r0, r1>> r5 */ > Coolness. Do we now get 0 diff when reassembling the shader_256.s code? > > I also added some support for /* */ and // comments. > > If a line starts with: > /* addr: word0 word1 */ > then the assembler also verifies that the assembled version has the same > word values. > > Syntax wise I think I should support: > ldi r0/r1, 0x12345678 > bra r0/r1, target > > As i think both ldi and bra/r can write to two registers at once. I think > / works better than , or ; as they lead to issues with the slots or args - > who knows I'll see what drops out. > Regarding separators - my emacs really don't like ";" inside an assembly opcode. Maybe using "|" or "$" to separate the subcommands will be better? In classical MASM, ";" is the mark for a comment. Thanks, --Shachar