RE: [PATCH v2] LoongArch: Add jump-label implementation

From: David Laight
Date: Thu May 11 2023 - 06:21:27 EST

From: Youling Tang
> Sent: 11 May 2023 02:34
> >> + if (type == JUMP_LABEL_JMP)
> >
> > Please use a switch for dealing with enum-typed values.
> Because the current type only has JUMP_LABEL_NOP and JUMP_LABEL_JMP,
> using if may be simpler than switch.

The generated code will be pretty much the same.
Even if the compiler is allowed generate a jump table
(which is almost certainly disabled) it won't if there
are only two cases.


Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)