1#! /bin/sh 2# Copyright (C) 2019 Red Hat, Inc. 3# This file is part of elfutils. 4# 5# This file is free software; you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation; either version 3 of the License, or 8# (at your option) any later version. 9# 10# elfutils is distributed in the hope that it will be useful, but 11# WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18. $srcdir/test-subr.sh 19 20testfiles testfile-riscv64-dis1.o testfile-riscv64-dis1.expect 21testrun_compare ${abs_top_builddir}/src/objdump -d testfile-riscv64-dis1.o < testfile-riscv64-dis1.expect 22 23exit $? 24 25# The following code is used to generate the test file. 26cat <<EOF | riscv64-linux-gnu-as -c -o testfile-riscv64-dis1.o - 27.text 28.word 0x80000037 29.word 0x800000b7 30.word 0x40300137 31.word 0x90000017 32.word 0x01003317 33.word 0x000000ef 34.word 0x0000116f 35.word 0x000021ef 36.word 0x0000426f 37.word 0x000082ef 38.word 0x0001036f 39.word 0x000203ef 40.word 0x0004046f 41.word 0x000804ef 42.word 0x0010056f 43.word 0x002005ef 44.word 0x0040066f 45.word 0x008006ef 46.word 0x0100076f 47.word 0x020007ef 48.word 0x0400086f 49.word 0x080008ef 50.word 0x1000096f 51.word 0x200009ef 52.word 0x40000a6f 53.word 0x80000aef 54.word 0x00000067 55.word 0x80008567 56.word 0x050109e7 57.word 0x00d30863 58.word 0x80c41463 59.word 0x40d348e3 60.word 0x20d35263 61.word 0x10d364e3 62.word 0x08d37463 63.word 0x00000003 64.word 0x83050703 65.word 0x00001003 66.word 0x850c1383 67.word 0x04012003 68.word 0xa50c2383 69.word 0x05013003 70.word 0xf50c3383 71.word 0x00004003 72.word 0x83054703 73.word 0x00005003 74.word 0x850c5383 75.word 0x04016003 76.word 0xa50c6383 77.word 0x00000023 78.word 0x5f430323 79.word 0x00001023 80.word 0x5f431323 81.word 0x00002023 82.word 0x5f432323 83.word 0x00003023 84.word 0x5f433323 85.word 0x00000013 86.word 0x00000093 87.word 0x00300093 88.word 0x00310093 89.word 0x00002013 90.word 0x00002093 91.word 0x00302093 92.word 0x00312093 93.word 0x00003013 94.word 0x00003093 95.word 0x00303093 96.word 0x00313093 97.word 0x00004013 98.word 0x00004093 99.word 0x00304093 100.word 0x00314093 101.word 0x00006013 102.word 0x00006093 103.word 0x00306093 104.word 0x00316093 105.word 0x00007013 106.word 0x00007093 107.word 0x00307093 108.word 0x00317093 109.word 0x00311093 110.word 0x00315093 111.word 0x40315093 112.word 0x00000033 113.word 0x010000b3 114.word 0x40000033 115.word 0x410000b3 116.word 0x40010033 117.word 0x410200b3 118.word 0x00001033 119.word 0x010010b3 120.word 0x00002033 121.word 0x010020b3 122.word 0x00012033 123.word 0x010220b3 124.word 0x00003033 125.word 0x010030b3 126.word 0x00043033 127.word 0x010530b3 128.word 0x00004033 129.word 0x010040b3 130.word 0x00005033 131.word 0x010050b3 132.word 0x40005033 133.word 0x410050b3 134.word 0x00006033 135.word 0x010060b3 136.word 0x00007033 137.word 0x010070b3 138.word 0x0000000f 139.word 0x0210000f 140.word 0x00000073 141.word 0x00100073 142.word 0x0000001b 143.word 0x0010001b 144.word 0x0000101b 145.word 0x0010101b 146.word 0x0000501b 147.word 0x0000501b 148.word 0x4010501b 149.word 0x4010501b 150.word 0x0000003b 151.word 0x0000003b 152.word 0x00d0833b 153.word 0x00d0833b 154.word 0x40d0833b 155.word 0x40d0833b 156.word 0x00d0933b 157.word 0x00d0933b 158.word 0x00d0d33b 159.word 0x00d0d33b 160.word 0x40d0d33b 161.word 0x40d0d33b 162.word 0x0000100f 163.word 0x00431073 164.word 0x00431ff3 165.word 0xc0132ff3 166.word 0xc8133ff3 167.word 0x00435ff3 168.word 0xc0136ff3 169.word 0xc8137ff3 170.word 0x02000033 171.word 0x02e40733 172.word 0x02001033 173.word 0x02e41733 174.word 0x02002033 175.word 0x02e42733 176.word 0x02003033 177.word 0x02e43733 178.word 0x02004033 179.word 0x02e44733 180.word 0x02005033 181.word 0x02e45733 182.word 0x02006033 183.word 0x02e46733 184.word 0x02007033 185.word 0x02e47733 186.word 0x0200003b 187.word 0x02e4073b 188.word 0x0200403b 189.word 0x02e4473b 190.word 0x0200503b 191.word 0x02e4573b 192.word 0x0200603b 193.word 0x02e4673b 194.word 0x0200703b 195.word 0x02e4773b 196.word 0x1000202f 197.word 0x1800202f 198.word 0x1000302f 199.word 0x1800302f 200.word 0x0800202f 201.word 0x0800302f 202.word 0x0000202f 203.word 0x0000302f 204.word 0x2000202f 205.word 0x2000302f 206.word 0x6000202f 207.word 0x6000302f 208.word 0x4000202f 209.word 0x4000302f 210.word 0x8000202f 211.word 0x8000302f 212.word 0xa000202f 213.word 0xa000302f 214.word 0xc000202f 215.word 0xc000302f 216.word 0xe000202f 217.word 0xe000302f 218.word 0x00002007 219.word 0x00003007 220.word 0x00004007 221.word 0x00002027 222.word 0x00003027 223.word 0x00004027 224.word 0x00002043 225.word 0x02002043 226.word 0x06002043 227.word 0x00002047 228.word 0x02002047 229.word 0x06002047 230.word 0x0000204b 231.word 0x0200204b 232.word 0x0600204b 233.word 0x0000204f 234.word 0x0200204f 235.word 0x0600204f 236.word 0x00000053 237.word 0x00001053 238.word 0x00002053 239.word 0x00003053 240.word 0x00004053 241.word 0x00007053 242.word 0x02000053 243.word 0x06000053 244.word 0x08000053 245.word 0x0a000053 246.word 0x0e000053 247.word 0x10000053 248.word 0x12000053 249.word 0x16000053 250.word 0x18000053 251.word 0x1a000053 252.word 0x1e000053 253.word 0x58000053 254.word 0x5a000053 255.word 0x5e000053 256.word 0x20000053 257.word 0x20300053 258.word 0x22000053 259.word 0x22300053 260.word 0x26000053 261.word 0x26300053 262.word 0x20001053 263.word 0x20401053 264.word 0x22001053 265.word 0x22401053 266.word 0x26001053 267.word 0x26401053 268.word 0x20002053 269.word 0x20702053 270.word 0x22002053 271.word 0x22702053 272.word 0x26002053 273.word 0x26702053 274.word 0x29700053 275.word 0x2b700053 276.word 0x2f700053 277.word 0x29701053 278.word 0x2b701053 279.word 0x2f701053 280.word 0xc00332d3 281.word 0xc02332d3 282.word 0xc20342d3 283.word 0xc22342d3 284.word 0xc60222d3 285.word 0xc62222d3 286.word 0xc01332d3 287.word 0xc03332d3 288.word 0xc21342d3 289.word 0xc23342d3 290.word 0xc61222d3 291.word 0xc63222d3 292.word 0xe00503d3 293.word 0xe20504d3 294.word 0xe60509d3 295.word 0xa0340753 296.word 0xa0341753 297.word 0xa0342753 298.word 0xa2340753 299.word 0xa2341753 300.word 0xa2342753 301.word 0xa6340753 302.word 0xa6341753 303.word 0xa6342753 304.word 0xe0091d53 305.word 0xe2091d53 306.word 0xe6091d53 307.word 0xd00e2453 308.word 0xd02e2453 309.word 0xd01e1453 310.word 0xd03e1453 311.word 0xd2030553 312.word 0xd2130553 313.word 0xd6030553 314.word 0xd6130553 315.word 0xd22e2453 316.word 0xd23e1453 317.word 0xd62e2453 318.word 0xd63e2453 319.word 0xf00c0753 320.word 0xf20c0753 321.word 0xf60c0753 322.short 0x1000 323.short 0x0800 324.short 0x0400 325.short 0x0200 326.short 0x0100 327.short 0x0080 328.short 0x0040 329.short 0x0020 330.short 0x3100 331.short 0x2900 332.short 0x2500 333.short 0x2140 334.short 0x2120 335.short 0x5100 336.short 0x4900 337.short 0x4500 338.short 0x4140 339.short 0x4120 340.short 0x7100 341.short 0x6900 342.short 0x6500 343.short 0x6140 344.short 0x6120 345.short 0xb100 346.short 0xa900 347.short 0xa500 348.short 0xa140 349.short 0xa120 350.short 0xd100 351.short 0xc900 352.short 0xc500 353.short 0xc140 354.short 0xc120 355.short 0xf100 356.short 0xe900 357.short 0xe500 358.short 0xe140 359.short 0xe120 360.short 0x1001 361.short 0x1301 362.short 0x0341 363.short 0x0321 364.short 0x0311 365.short 0x0309 366.short 0x0305 367.short 0x2081 368.short 0x3081 369.short 0x20c1 370.short 0x20a1 371.short 0x2091 372.short 0x2089 373.short 0x2085 374.short 0x2105 375.short 0x2185 376.short 0x2205 377.short 0x2285 378.short 0x2305 379.short 0x2385 380.short 0x2405 381.short 0x2485 382.short 0x2505 383.short 0x2585 384.short 0x2605 385.short 0x2685 386.short 0x2705 387.short 0x2785 388.short 0x2805 389.short 0x2885 390.short 0x2905 391.short 0x2985 392.short 0x2a05 393.short 0x2a85 394.short 0x2b05 395.short 0x2b85 396.short 0x2c05 397.short 0x2c85 398.short 0x2d05 399.short 0x2d85 400.short 0x2e05 401.short 0x2e85 402.short 0x2f05 403.short 0x2f85 404.short 0x4081 405.short 0x5081 406.short 0x40c1 407.short 0x40a1 408.short 0x4091 409.short 0x4089 410.short 0x4085 411.short 0x7101 412.short 0x6141 413.short 0x6121 414.short 0x6111 415.short 0x6109 416.short 0x6105 417.short 0x7301 418.short 0x6341 419.short 0x6321 420.short 0x6311 421.short 0x6309 422.short 0x6305 423.short 0x9001 424.short 0x8041 425.short 0x8021 426.short 0x8011 427.short 0x8009 428.short 0x8005 429.short 0x8405 430.short 0x8801 431.short 0x9801 432.short 0x8941 433.short 0x8921 434.short 0x8911 435.short 0x8909 436.short 0x8905 437.short 0x8f11 438.short 0x8f31 439.short 0x8f51 440.short 0x8f71 441.short 0x9f11 442.short 0x9f31 443.short 0xa001 444.short 0xb001 445.short 0xa801 446.short 0xa401 447.short 0xa201 448.short 0xa101 449.short 0xa081 450.short 0xa041 451.short 0xa021 452.short 0xa011 453.short 0xa009 454.short 0xa005 455.short 0xc301 456.short 0xd301 457.short 0xcb01 458.short 0xc701 459.short 0xc341 460.short 0xc321 461.short 0xc311 462.short 0xc309 463.short 0xc305 464.short 0xe301 465.short 0xf301 466.short 0xeb01 467.short 0xe701 468.short 0xe341 469.short 0xe321 470.short 0xe311 471.short 0xe309 472.short 0xe305 473.short 0x1302 474.short 0x0342 475.short 0x0322 476.short 0x0312 477.short 0x030a 478.short 0x0306 479.short 0x2702 480.short 0x3702 481.short 0x2742 482.short 0x2722 483.short 0x2712 484.short 0x270a 485.short 0x2706 486.short 0x4702 487.short 0x5702 488.short 0x4742 489.short 0x4722 490.short 0x4712 491.short 0x470a 492.short 0x4706 493.short 0x6702 494.short 0x7702 495.short 0x6742 496.short 0x6722 497.short 0x6712 498.short 0x670a 499.short 0x6706 500.short 0x8302 501.short 0x8342 502.short 0x9002 503.short 0x9502 504.short 0x9572 505.short 0xa062 506.short 0xb062 507.short 0xa862 508.short 0xa462 509.short 0xa262 510.short 0xa162 511.short 0xa0e2 512.short 0xc062 513.short 0xd062 514.short 0xc862 515.short 0xc462 516.short 0xc262 517.short 0xc162 518.short 0xc0e2 519.short 0xe062 520.short 0xf062 521.short 0xe862 522.short 0xe462 523.short 0xe262 524.short 0xe162 525.short 0xe0e2 526.word 0x00153073 527.word 0x0011d073 528.word 0x0011e073 529EOF 530