1#! /bin/sh 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright(c) 2020 Intel Corporation 4 5AS=${AS:-as} 6OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX.o) 7trap 'rm -f "$OBJFILE"' EXIT 8# from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028 9GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}' 10 11# assemble vpgather to file and similarly check 12echo "vpgatherqq $GATHER_PARAMS" | $AS --64 -o $OBJFILE - 13objdump -d --no-show-raw-insn $OBJFILE | grep -q $GATHER_PARAMS || { 14 echo "vpgatherqq displacement error with as" 15 exit 1 16} 17