Thanks Jakub, will fix the format issue and send the V3 patch, as well as try to validate it for offloading.
Pan -----Original Message----- From: Jakub Jelinek <[email protected]> Sent: Wednesday, June 21, 2023 3:16 PM To: Li, Pan2 <[email protected]> Cc: [email protected]; [email protected]; [email protected]; [email protected]; Wang, Yanzhang <[email protected]>; [email protected]; [email protected] Subject: Re: [PATCH] RISC-V: Fix out of range memory access of machine mode table On Wed, Jun 21, 2023 at 06:59:08AM +0000, Li, Pan2 wrote: > inline machine_mode > bp_unpack_machine_mode (struct bitpack_d *bp) > { > - return (machine_mode) > - ((class lto_input_block *) > - bp->stream)->mode_table[bp_unpack_enum (bp, machine_mode, 1 << 8)]; > + int last = 1 << ceil_log2 (MAX_MACHINE_MODE); > + lto_input_block *input_block = (class lto_input_block *) bp->stream; Still 2 spaces instead of 1 here, otherwise it LGTM, but the important question is if you have actually tested it with offloading, because only that will verify it works correctly. See https://gcc.gnu.org/wiki/Offloading for details. Jakub
