SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2018 v23 Beta Discussion => Topic started by: jc44 on August 22, 2018, 02:30:34 PM

Title: B2: Odd asm syntax colouring (old issue)
Post by: jc44 on August 22, 2018, 02:30:34 PM
Asm blocks such as the one blow have odd highlighting - see attached png

static inline uint32_t hevc_mem_bits32_arm(const void * p, const unsigned int bits)
{
    unsigned int n;
    __asm__ (
        "rev        %[n], %
        : [n]"=r"(n)
        :
        :
        );
    return n << (bits & 7);
}

Life can be even more confused if you include comments in the asm lines:

tatic inline uint32_t get_cabac_by22_peek_arm(const CABACContext *const c)
{
    uint32_t rv = c->low &~ 1, tmp;
    __asm__ (
        "cmp      %[inv] , #0                    \n\t"
        "it       ne                             \n\t"
// A comment (with brackets)
        "umullne  %[tmp] , %[rv] , %[inv], %[rv] \n\t"
        :  // Outputs
             [rv]"+r"(rv),
             [tmp]"=r"(tmp)
        :  // Inputs
             [inv]"r"(c->range)
        :  // Clobbers
                "cc"
    );
    return rv << 1;
}

Thanks

John Cox
Title: Re: B2: Odd asm syntax colouring (old issue)
Post by: Clark on August 22, 2018, 10:35:17 PM
The current embedded color coding for this is way off. I think we need to change this to just color all this as C++ and that will work better for now. The C/C++ parser (and beautifier) will still skip over this correctly.
Title: Re: B2: Odd asm syntax colouring (old issue)
Post by: jc44 on August 23, 2018, 10:30:57 AM
It would be great if it worked properly, but straight C syntax colouring works for me too.