Nelson Chu c2137f55ad RISC-V: Add sext.[bh] and zext.[bhw] pseudo instructions.
https://github.com/riscv/riscv-asm-manual/pull/61

We aleady have sext.w, so just add sext.b, sext.h, zext.b, zext.h
and zext.w.  In a certain sense, zext.b is not a pseudo - It is an
alias of andi.  Similarly, sext.b and sext.h are aliases of other
rvb instructions, when we enable b extension; But they are pseudos
when we just enable rvi.  However, this patch does not consider the
rvb cases.  Besides, zext.w is only valid in rv64.

gas/
    * config/tc-riscv.c (riscv_ext): New function.  Use md_assemblef
    to expand the zext and sext pseudos, to give them a chance to be
    expanded into c-ext instructions.
    (macro): Handle M_ZEXTH, M_ZEXTW, M_SEXTB and M_SEXTH.
    * testsuite/gas/riscv/ext.s: New testcase.
    * testsuite/gas/riscv/ext-32.d: Likewise.
    * testsuite/gas/riscv/ext-64.d: Likewise.
include/
    * opcode/riscv.h (M_ZEXTH, M_ZEXTW, M_SEXTB, M_SEXTH.): Added.
opcodes/
    * riscv-opc.c (riscv_opcodes): Add sext.[bh] and zext.[bhw].
2020-12-10 10:50:44 +08:00
..
2020-02-26 10:37:25 +10:30
2020-02-26 10:37:25 +10:30
2020-07-07 16:01:48 +03:00
2020-07-07 16:01:48 +03:00
2020-06-29 10:07:56 +09:30
2020-09-18 10:04:23 -07:00
2020-09-18 10:04:23 -07:00
2020-09-02 16:30:44 +09:30
2020-09-18 10:04:23 -07:00
2020-09-18 10:04:23 -07:00
2020-10-05 14:20:15 +01:00
2020-10-05 14:20:15 +01:00
2020-09-02 16:30:44 +09:30
2020-01-01 18:12:08 +10:30
2020-06-29 10:07:56 +09:30
2020-10-26 16:26:32 +08:00
2020-09-02 16:30:44 +09:30
2020-09-02 16:30:44 +09:30
2020-09-02 16:30:44 +09:30
2020-06-29 10:07:56 +09:30
2020-07-14 10:42:33 +02:00
2020-07-14 10:42:33 +02:00
2020-10-20 13:58:04 -07:00
2020-10-20 13:58:04 -07:00
2020-10-20 13:58:04 -07:00
2020-10-20 13:58:04 -07:00
2020-10-20 13:58:04 -07:00
2020-09-02 16:30:44 +09:30
2020-09-02 16:30:44 +09:30
2020-09-02 16:30:44 +09:30
2020-09-02 16:30:44 +09:30
2020-09-02 16:30:44 +09:30
2020-01-10 17:32:33 +10:30
2020-01-10 17:32:33 +10:30
2020-09-02 16:30:44 +09:30
2020-03-20 12:35:51 +10:30
2020-06-29 10:07:56 +09:30
2020-09-02 16:30:44 +09:30
2020-02-26 10:37:25 +10:30
2020-02-26 10:37:25 +10:30
2020-05-28 22:08:42 +09:30
2020-01-17 12:34:03 -06:00
2020-09-02 16:30:44 +09:30
2020-09-16 16:41:33 +09:30
2020-03-22 23:20:15 +10:30
2020-06-29 10:07:56 +09:30
2020-01-13 12:12:41 +10:30
2020-01-13 12:12:41 +10:30
2020-10-05 14:20:15 +01:00
2020-06-29 10:07:56 +09:30
2020-02-26 10:37:25 +10:30
2020-09-02 16:30:44 +09:30
2020-06-29 10:07:56 +09:30
2020-09-02 16:30:44 +09:30