Browse Source

Add a note that generated files are generated.

Folks keep assuming checked-in assembly files are the source. Between
the preprocessor, delocate, NASM not using the C preprocessor, and GAS's
arch-specific comment syntax, comment markers are kind of a disaster.
This set appears to work for now.

Change-Id: I48e26dafb444dfa310df80dcce87ac291fde8037
Reviewed-on: https://boringssl-review.googlesource.com/c/33304
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 6 years ago
committed by CQ bot account: commit-bot@chromium.org
parent
commit
bbc429148f
4 changed files with 25 additions and 2 deletions
  1. +3
    -0
      crypto/perlasm/arm-xlate.pl
  2. +3
    -0
      crypto/perlasm/ppc-xlate.pl
  3. +10
    -0
      crypto/perlasm/x86_64-xlate.pl
  4. +9
    -2
      crypto/perlasm/x86asm.pl

+ 3
- 0
crypto/perlasm/arm-xlate.pl View File

@@ -141,6 +141,9 @@ sub expand_line {
}

print <<___;
// This file is generated from a similarly-named Perl script in the BoringSSL
// source tree. Do not edit by hand.

#if defined(__has_feature)
#if __has_feature(memory_sanitizer) && !defined(OPENSSL_NO_ASM)
#define OPENSSL_NO_ASM


+ 3
- 0
crypto/perlasm/ppc-xlate.pl View File

@@ -256,6 +256,9 @@ my $darn = sub {
};

print <<___;
# This file is generated from a similarly-named Perl script in the BoringSSL
# source tree. Do not edit by hand.

#if defined(__has_feature)
#if __has_feature(memory_sanitizer) && !defined(OPENSSL_NO_ASM)
#define OPENSSL_NO_ASM


+ 10
- 0
crypto/perlasm/x86_64-xlate.pl View File

@@ -1123,6 +1123,16 @@ my $endbranch = sub {

########################################################################

{
my $comment = "#";
$comment = ";" if ($masm || $nasm);
print <<___;
$comment This file is generated from a similarly-named Perl script in the BoringSSL
$comment source tree. Do not edit by hand.

___
}

if ($nasm) {
print <<___;
default rel


+ 9
- 2
crypto/perlasm/x86asm.pl View File

@@ -255,9 +255,16 @@ sub ::asciz

sub ::asm_finish
{ &file_end();
print "#if defined(__i386__)\n" unless $win32;
my $comment = "#";
$comment = ";" if ($win32 || $netware);
print <<___;
$comment This file is generated from a similarly-named Perl script in the BoringSSL
$comment source tree. Do not edit by hand.

___
print "#if defined(__i386__)\n" unless ($win32 || $netware);
print @out;
print "#endif\n" unless $win32;
print "#endif\n" unless ($win32 || $netware);
}

sub ::asm_init


Loading…
Cancel
Save