aboutsummaryrefslogtreecommitdiffstats
path: root/manual/PRESENTATION_ExAdv/macc_xilinx_test.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-02-13 13:27:15 -0800
committerEddie Hung <eddie@fpgeh.com>2020-02-13 13:27:15 -0800
commit6b58c1820c7bbacb4730af40e10592823b0eb15c (patch)
treef878ff9902af732ca253999dcd596f6f987cc336 /manual/PRESENTATION_ExAdv/macc_xilinx_test.v
parent2e51dc1856aae456e15cafd484997bfbd102175e (diff)
downloadyosys-6b58c1820c7bbacb4730af40e10592823b0eb15c.tar.gz
yosys-6b58c1820c7bbacb4730af40e10592823b0eb15c.tar.bz2
yosys-6b58c1820c7bbacb4730af40e10592823b0eb15c.zip
verilog: improve specify support when not in -specify mode
Diffstat (limited to 'manual/PRESENTATION_ExAdv/macc_xilinx_test.v')
0 files changed, 0 insertions, 0 deletions
13' href='#n113'>113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
/* 
 * User address space access functions.
 *
 * Copyright 1997 Andi Kleen <ak@muc.de>
 * Copyright 1997 Linus Torvalds
 * Copyright 2002 Andi Kleen <ak@suse.de>
 */

#include <xen/config.h>
#include <xen/lib.h>
#include <asm/uaccess.h>

unsigned long __copy_to_user_ll(void __user *to, const void *from, unsigned n)
{
    unsigned long __d0, __d1, __d2, __n = n;

    asm volatile (
        "    cmp  $"STR(2*BYTES_PER_LONG-1)",%0\n"
        "    jbe  1f\n"
        "    mov  %1,%0\n"
        "    neg  %0\n"
        "    and  $"STR(BYTES_PER_LONG-1)",%0\n"
        "    sub  %0,%3\n"
        "4:  rep movsb\n" /* make 'to' address aligned */
        "    mov  %3,%0\n"
        "    shr  $"STR(LONG_BYTEORDER)",%0\n"