These are codes that come up naturally when translating WebAssembly and legalizing the Cretonne instruction set.
The trap and trapz/trapnz instructions now take a trap code immediate operand which indicates the reason for trapping.