• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂478fd476d3fe8a73ff3faa0b2b62ef4b66def9d7 (tree)
時間2016-08-23 17:41:03
作者Richard Sandiford <richard.sandiford@arm....>
CommiterRichard Sandiford

Log Message

[AArch64][SVE 17/32] Add a prefix parameter to print_register_list

This patch generalises the interface to print_register_list so
that it can print register lists involving SVE z registers as
well as AdvSIMD v ones.

opcodes/
* aarch64-opc.c (print_register_list): Add a prefix parameter.
(aarch64_print_operand): Update accordingly.

Change-Id: Iae90472b0e2ef7acfcf749bd1d4296ccf82378d6

Change Summary

差異

--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -2261,9 +2261,11 @@ expand_fp_imm (int size, uint32_t imm8)
22612261 }
22622262
22632263 /* Produce the string representation of the register list operand *OPND
2264- in the buffer pointed by BUF of size SIZE. */
2264+ in the buffer pointed by BUF of size SIZE. PREFIX is the part of
2265+ the register name that comes before the register number, such as "v". */
22652266 static void
2266-print_register_list (char *buf, size_t size, const aarch64_opnd_info *opnd)
2267+print_register_list (char *buf, size_t size, const aarch64_opnd_info *opnd,
2268+ const char *prefix)
22672269 {
22682270 const int num_regs = opnd->reglist.num_regs;
22692271 const int first_reg = opnd->reglist.first_regno;
@@ -2284,8 +2286,8 @@ print_register_list (char *buf, size_t size, const aarch64_opnd_info *opnd)
22842286 more than two registers in the list, and the register numbers
22852287 are monotonically increasing in increments of one. */
22862288 if (num_regs > 2 && last_reg > first_reg)
2287- snprintf (buf, size, "{v%d.%s-v%d.%s}%s", first_reg, qlf_name,
2288- last_reg, qlf_name, tb);
2289+ snprintf (buf, size, "{%s%d.%s-%s%d.%s}%s", prefix, first_reg, qlf_name,
2290+ prefix, last_reg, qlf_name, tb);
22892291 else
22902292 {
22912293 const int reg0 = first_reg;
@@ -2296,20 +2298,21 @@ print_register_list (char *buf, size_t size, const aarch64_opnd_info *opnd)
22962298 switch (num_regs)
22972299 {
22982300 case 1:
2299- snprintf (buf, size, "{v%d.%s}%s", reg0, qlf_name, tb);
2301+ snprintf (buf, size, "{%s%d.%s}%s", prefix, reg0, qlf_name, tb);
23002302 break;
23012303 case 2:
2302- snprintf (buf, size, "{v%d.%s, v%d.%s}%s", reg0, qlf_name,
2303- reg1, qlf_name, tb);
2304+ snprintf (buf, size, "{%s%d.%s, %s%d.%s}%s", prefix, reg0, qlf_name,
2305+ prefix, reg1, qlf_name, tb);
23042306 break;
23052307 case 3:
2306- snprintf (buf, size, "{v%d.%s, v%d.%s, v%d.%s}%s", reg0, qlf_name,
2307- reg1, qlf_name, reg2, qlf_name, tb);
2308+ snprintf (buf, size, "{%s%d.%s, %s%d.%s, %s%d.%s}%s",
2309+ prefix, reg0, qlf_name, prefix, reg1, qlf_name,
2310+ prefix, reg2, qlf_name, tb);
23082311 break;
23092312 case 4:
2310- snprintf (buf, size, "{v%d.%s, v%d.%s, v%d.%s, v%d.%s}%s",
2311- reg0, qlf_name, reg1, qlf_name, reg2, qlf_name,
2312- reg3, qlf_name, tb);
2313+ snprintf (buf, size, "{%s%d.%s, %s%d.%s, %s%d.%s, %s%d.%s}%s",
2314+ prefix, reg0, qlf_name, prefix, reg1, qlf_name,
2315+ prefix, reg2, qlf_name, prefix, reg3, qlf_name, tb);
23132316 break;
23142317 }
23152318 }
@@ -2513,7 +2516,7 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc,
25132516 case AARCH64_OPND_LVt:
25142517 case AARCH64_OPND_LVt_AL:
25152518 case AARCH64_OPND_LEt:
2516- print_register_list (buf, size, opnd);
2519+ print_register_list (buf, size, opnd, "v");
25172520 break;
25182521
25192522 case AARCH64_OPND_Cn: