dlang / dmd

Compare 0c86139 ... +2 ... e9cc3dd

Coverage Reach
backend/cod3.d backend/cod2.d backend/cgelem.d backend/cod1.d backend/cod4.d backend/cg87.d backend/gloop.d backend/cgsched.d backend/evalu8.d backend/cgcod.d backend/elfobj.d backend/elem.d backend/dwarfdbginf.d backend/cgxmm.d backend/blockopt.d backend/gother.d backend/gflow.d backend/out.d backend/dtype.d backend/cgreg.d backend/gdag.d backend/glocal.d backend/cgcs.d backend/nteh.d backend/symbol.d backend/elpicpie.d backend/dt.d backend/debugprint.d backend/dvec.d backend/dwarfeh.d backend/gsroa.d backend/dvarstats.d backend/backconfig.d backend/drtlsym.d backend/go.d backend/cgen.d backend/codebuilder.d backend/aarray.d backend/md5.d backend/bcomplex.d backend/outbuf.d backend/divcoeff.d backend/dlist.d backend/obj.d backend/compress.d backend/ph2.d backend/cgcse.d backend/util2.d backend/cc.d backend/iasm.d backend/code_x86.d backend/barray.d backend/ty.d backend/oper.d backend/ptrntab.d backend/dcode.d backend/cod5.d backend/os.d backend/code.d backend/ee.d backend/melf.d backend/mach.d backend/mem.d backend/el.d backend/cdef.d backend/fp.d backend/cgcv.d backend/type.d backend/global.d expressionsem.d parse.d dinterpret.d dtemplate.d dsymbolsem.d e2ir.d mtype.d doc.d expression.d typesem.d iasmdmd.d statementsem.d hdrgen.d dcast.d lexer.d func.d root/filename.d root/outbuffer.d root/array.d root/stringtable.d root/response.d root/speller.d root/aav.d root/rmem.d root/file.d root/ctfloat.d root/port.d root/bitarray.d root/string.d root/hash.d root/region.d root/man.d root/rootobject.d mars.d ctfeexpr.d constfold.d ob.d traits.d opover.d cppmangle.d dtoh.d inline.d escape.d dsymbol.d s2ir.d semantic3.d declaration.d statement.d cppmanglewin.d glue.d toobj.d todt.d dmodule.d clone.d optimize.d json.d chkformat.d dmangle.d initsem.d attrib.d dclass.d target.d toir.d objc_glue.d cond.d intrange.d tocsym.d aggregate.d dstruct.d semantic2.d dscope.d argtypes.d libelf.d impcnvtab.d errors.d staticcond.d parsetimevisitor.d link.d builtin.d dmacro.d objc.d blockexit.d argtypes_sysv_x64.d lambdacomp.d inlinecost.d iasmgcc.d eh.d sideeffect.d denum.d arrayop.d dinifile.d tokens.d compiler.d foreachvar.d access.d dimport.d utf.d nogc.d toctype.d init.d typinf.d visitor.d canthrow.d identifier.d delegatize.d globals.d argtypes_aarch64.d safe.d dversion.d ctorflow.d statement_rewrite_walker.d aliasthis.d scanelf.d utils.d stmtstate.d dmsc.d apply.d sapply.d nspace.d filecache.d cli.d templateparamsem.d printast.d asttypename.d complex.d lib.d env.d staticassert.d id.d console.d iasm.d entity.d imphint.d ast_node.d

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -1,12 +1,13 @@
Loading
1 1
/**
2 -
 * Compiler implementation of the
3 -
 * $(LINK2 http://www.dlang.org, D programming language).
2 +
 * Constants and data structures specific to the x86 platform.
4 3
 *
5 4
 * Copyright:   Copyright (C) 1985-1998 by Symantec
6 5
 *              Copyright (C) 2000-2020 by The D Language Foundation, All Rights Reserved
7 6
 * Authors:     $(LINK2 http://www.digitalmars.com, Walter Bright)
8 7
 * License:     $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
9 8
 * Source:      $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/backend/code_x86.d, backend/code_x86.d)
9 +
 * Documentation:  https://dlang.org/phobos/dmd_backend_code_x86.html
10 +
 * Coverage:    https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/code_x86.d
10 11
 */
11 12
12 13
module dmd.backend.code_x86;
@@ -461,6 +462,7 @@
Loading
461 462
    JG      = 0x7F,
462 463
463 464
    UD2     = 0x0F0B,
465 +
    PAUSE   = 0xF390,  // aka REP NOP
464 466
465 467
    // NOP is used as a placeholder in the linked list of instructions, no
466 468
    // actual code will be generated for it.

@@ -1,5 +1,6 @@
Loading
1 1
/**
2 2
 * Inline assembler implementation for DMD.
3 +
 * https://dlang.org/spec/iasm.html
3 4
 *
4 5
 * Copyright:   Copyright (c) 1992-1999 by Symantec
5 6
 *              Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved
@@ -1713,6 +1714,10 @@
Loading
1713 1714
            {
1714 1715
                pc.Irm = puc[0];
1715 1716
            }
1717 +
            else if (opcode == PAUSE)
1718 +
            {
1719 +
                pc.Iop = PAUSE;
1720 +
            }
1716 1721
            else
1717 1722
            {
1718 1723
                pc.IEV2.Vint = puc[0];
@@ -3860,6 +3865,8 @@
Loading
3860 3865
                asm_token();
3861 3866
                OPND o2;
3862 3867
                asm_mul_exp(o2);
3868 +
                if (o2.base || o2.pregDisp1 || o2.pregDisp2)
3869 +
                    asmerr("cannot subtract register");
3863 3870
                if (asm_isint(o1) && asm_isint(o2))
3864 3871
                {
3865 3872
                    o1.disp -= o2.disp;
@@ -4046,6 +4053,8 @@
Loading
4046 4053
        case TOK.min:
4047 4054
            asm_token();
4048 4055
            asm_una_exp(o1);
4056 +
            if (o1.base || o1.pregDisp1 || o1.pregDisp2)
4057 +
                asmerr("cannot negate register");
4049 4058
            if (asm_isint(o1))
4050 4059
                o1.disp = -o1.disp;
4051 4060
            break;

@@ -6192,6 +6192,10 @@
Loading
6192 6192
            }
6193 6193
            break;
6194 6194
6195 +
        case 0x90:
6196 +
            size = (c.Iop == PAUSE) ? 2 : 1;
6197 +
            goto Lret2;
6198 +
6195 6199
        case NOP:
6196 6200
        case ESCAPE:
6197 6201
            size = 0;                   // since these won't be output

@@ -1,11 +1,12 @@
Loading
1 1
/**
2 -
 * Compiler implementation of the
3 -
 * $(LINK2 http://www.dlang.org, D programming language).
2 +
 * Instruction tables for inline assembler.
4 3
 *
5 4
 * Copyright:   Copyright (C) 1985-1998 by Symantec
6 5
 *              Copyright (C) 2000-2020 by The D Language Foundation, All Rights Reserved
7 6
 * License:     $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8 7
 * Source:      $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/backend/ptrntab.d, backend/ptrntab.d)
8 +
 * Documentation:  https://dlang.org/phobos/dmd_backend_ptrntab.html
9 +
 * Coverage:    https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/ptrntab.d
9 10
 */
10 11
11 12
module dmd.backend.ptrntab;
@@ -1751,12 +1752,9 @@
Loading
1751 1752
1752 1753
////////////////////// New Opcodes /////////////////////////////
1753 1754
1754 -
static if (0) // Use REP NOP instead
1755 -
{
1756 1755
PTRNTAB0[1] aptb0PAUSE =  /* PAUSE */ [
1757 -
        { 0xf390, 0 }
1756 +
        { PAUSE, 0 }            // same as REP NOP sequene
1758 1757
];
1759 -
}
1760 1758
1761 1759
PTRNTAB0[1] aptb0SYSCALL =  /* SYSCALL */ [
1762 1760
        { 0x0f05, _modcxr11 }
@@ -4802,6 +4800,7 @@
Loading
4802 4800
4803 4801
immutable OP[] optab =
4804 4802
[
4803 +
//      opcode string, number of operators, reference to PTRNTAB
4805 4804
        { "__emit",     ITdata | OPdb,  { null } },
4806 4805
        { "_emit",      ITdata | OPdb,  { null } },
4807 4806
        { "aaa",        0,              { aptb0AAA.ptr } },
@@ -5215,7 +5214,7 @@
Loading
5215 5214
        { "palignr",        3,              { aptb3PALIGNR.ptr } },
5216 5215
        { "pand",           2,              { aptb2PAND.ptr } },
5217 5216
        { "pandn",          2,              { aptb2PANDN.ptr } },
5218 -
        /* { "pause",       0,              { aptb0PAUSE.ptr } }, */
5217 +
        { "pause",          0,              { aptb0PAUSE.ptr } },
5219 5218
        { "pavgb",          2,              { aptb2PAVGB.ptr } },
5220 5219
        { "pavgusb",        2,              { aptb2PAVGUSB.ptr } },
5221 5220
        { "pavgw",          2,              { aptb2PAVGW.ptr } },

Learn more Showing 1 files with coverage changes found.

Changes in src/dmd/iasmdmd.d
-1
+1
Loading file...
Files Coverage
src/dmd 0.006% 77.211%
Project Totals (203 files) 77.211%
Loading