mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alexandre Ghiti <alexghiti@rivosinc.com>,
	Andrew Jones <ajones@ventanamicro.com>,
	Charlie Jenkins <charlie@rivosinc.com>,
	Samuel Holland <samuel.holland@sifive.com>
Subject: arch/riscv/lib/strncmp.S:11: Error: unrecognized opcode `__alternative_cfg("nop", "j strncmp_zbb",0,30,'
Date: Sun, 13 Apr 2025 07:18:45 +0800	[thread overview]
Message-ID: <202504130710.3IKz6Ibs-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b676ac484f847bbe5c7d29603f41475b64fefe55
commit: 9343aaba1f256ff42730db5a61efc32a86149776 RISC-V: separate Zbb optimisations requiring and not requiring toolchain support
date:   4 weeks ago
config: riscv-randconfig-001-20250413 (https://download.01.org/0day-ci/archive/20250413/202504130710.3IKz6Ibs-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250413/202504130710.3IKz6Ibs-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504130710.3IKz6Ibs-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/riscv/lib/strncmp.S: Assembler messages:
>> arch/riscv/lib/strncmp.S:11: Error: unrecognized opcode `__alternative_cfg("nop", "j strncmp_zbb",0,30,'
>> arch/riscv/lib/strncmp.S:12: Error: junk at end of line, first unrecognized character is `0'
--
   arch/riscv/lib/strlen.S: Assembler messages:
>> arch/riscv/lib/strlen.S:11: Error: unrecognized opcode `__alternative_cfg("nop", "j strlen_zbb",0,30,'
>> arch/riscv/lib/strlen.S:12: Error: junk at end of line, first unrecognized character is `0'
--
   arch/riscv/lib/strcmp.S: Assembler messages:
>> arch/riscv/lib/strcmp.S:11: Error: unrecognized opcode `__alternative_cfg("nop", "j strcmp_zbb",0,30,'
>> arch/riscv/lib/strcmp.S:12: Error: junk at end of line, first unrecognized character is `0'


vim +11 arch/riscv/lib/strncmp.S

    10	
  > 11		__ALTERNATIVE_CFG("nop", "j strncmp_zbb", 0, RISCV_ISA_EXT_ZBB,
  > 12			IS_ENABLED(CONFIG_RISCV_ISA_ZBB) && IS_ENABLED(CONFIG_TOOLCHAIN_HAS_ZBB))
    13	
    14		/*
    15		 * Returns
    16		 *   a0 - comparison result, value like strncmp
    17		 *
    18		 * Parameters
    19		 *   a0 - string1
    20		 *   a1 - string2
    21		 *   a2 - number of characters to compare
    22		 *
    23		 * Clobbers
    24		 *   t0, t1, t2
    25		 */
    26		li	t2, 0
    27	1:
    28		beq	a2, t2, 2f
    29		lbu	t0, 0(a0)
    30		lbu	t1, 0(a1)
    31		addi	a0, a0, 1
    32		addi	a1, a1, 1
    33		bne	t0, t1, 3f
    34		addi	t2, t2, 1
    35		bnez	t0, 1b
    36	2:
    37		li	a0, 0
    38		ret
    39	3:
    40		/*
    41		 * strncmp only needs to return (< 0, 0, > 0) values
    42		 * not necessarily -1, 0, +1
    43		 */
    44		sub	a0, t0, t1
    45		ret
    46	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-04-12 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-12 23:18 kernel test robot [this message]
2025-04-14 10:11 ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202504130710.3IKz6Ibs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ajones@ventanamicro.com \
    --cc=alexghiti@rivosinc.com \
    --cc=charlie@rivosinc.com \
    --cc=conor.dooley@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=samuel.holland@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®