X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fperlasm%2Fx86masm.pl;h=a0a354c8fc36be6af9410b4d03337eb160cab962;hp=33ceeb5ab4e4d53e474149ed92f9c4a0b928ff3e;hb=abeae4d3251181f1cedd15e4433e79406b766155;hpb=3a87756fed55879c5aaab0546654d30e434ff7dc diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl index 33ceeb5ab4..a0a354c8fc 100644 --- a/crypto/perlasm/x86masm.pl +++ b/crypto/perlasm/x86masm.pl @@ -1,4 +1,11 @@ -#!/usr/bin/env perl +#! /usr/bin/env perl +# Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + package x86masm; @@ -8,17 +15,21 @@ $::lbdecor="\$L"; # local label decoration $nmdecor="_"; # external name decoration $initseg=""; +$segment=""; sub ::generic { my ($opcode,@arg)=@_; # fix hexadecimal constants - $arg[0] =~ s/0x([0-9a-f]+)/0$1h/oi if (defined($arg[0])); - $arg[1] =~ s/0x([0-9a-f]+)/0$1h/oi if (defined($arg[1])); - - # fix xmm references - $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i); - $arg[1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i); + for (@arg) { s/(?