"Fossies" - the Fresh Open Source Software Archive

Member "go/src/cmd/asm/internal/asm/testdata/386enc.s" (9 Sep 2020, 1205 Bytes) of package /windows/misc/go1.14.9.windows-386.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PowerPC Assembler source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 // Copyright 2018 The Go Authors. All rights reserved.
    2 // Use of this source code is governed by a BSD-style
    3 // license that can be found in the LICENSE file.
    4 
    5 #include "../../../../../runtime/textflag.h"
    6 
    7 TEXT asmtest(SB),DUPOK|NOSPLIT,$0
    8     // Instructions that were encoded with BYTE sequences.
    9     // Included to simplify validation of CL that fixed that.
   10     MOVQ (AX), M0  // 0f6f00
   11     MOVQ M0, 8(SP) // 0f7f442408
   12     MOVQ 8(SP), M0 // 0f6f442408
   13     MOVQ M0, (AX)  // 0f7f00
   14     MOVQ M0, (BX)  // 0f7f03
   15     // On non-64bit arch, Go asm allowed uint32 offsets instead of int32.
   16     // These tests check that property for backwards-compatibility.
   17     MOVL 2147483648(AX), AX  // 8b8000000080
   18     MOVL -2147483648(AX), AX // 8b8000000080
   19     ADDL 2147483648(AX), AX  // 038000000080
   20     ADDL -2147483648(AX), AX // 038000000080
   21     // Make sure MOV CR/DR continues to work after changing its movtabs.
   22     MOVL CR0, AX // 0f20c0
   23     MOVL CR0, DX // 0f20c2
   24     MOVL CR4, DI // 0f20e7
   25     MOVL AX, CR0 // 0f22c0
   26     MOVL DX, CR0 // 0f22c2
   27     MOVL DI, CR4 // 0f22e7
   28     MOVL DR0, AX // 0f21c0
   29     MOVL DR6, DX // 0f21f2
   30     MOVL DR7, SI // 0f21fe
   31     // Test other movtab entries.
   32     PUSHL SS // 16
   33     PUSHL FS // 0fa0
   34     POPL FS  // 0fa1
   35     POPL SS  // 17
   36     // End of tests.
   37     RET