(This is under CCS 7.4.0.00015 -- yes I know it's rather old, I'm dealing with some old code...) In the assembler, simplifying the original greatly:
.cdecls C
%{
enum { CPU_MODE = 0x1f };
%}
.text
and r5, r0, #CPU_MODE
draws an "unknown symbol" error. There doesn't seem to be any way for assembler code to reference a C enumerated constant declared without an enum tag name (which is legal C, and always has been, and is now a fairly common way of declaring integer constants).