I know I can iterate over a list in bash like so:
for reg in xmm ymm zmm; do
echo "Reg is $reg"
done
Great.
What if I want to iterate over a list of tuples, like (fake syntax):
for reg, size in (xmm, 128) (ymm, 256) (zmm, 512); do
echo "Reg $reg has size $size"
done
It should print out:
Reg xmm has size 128
Reg ymm has size 256
Reg ymm has size 512
What is a convenient way to do this?