Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile with Visual C++ 2010 x64 #182

Closed
exhu opened this issue Aug 2, 2012 · 0 comments
Closed

Does not compile with Visual C++ 2010 x64 #182

exhu opened this issue Aug 2, 2012 · 0 comments

Comments

@exhu
Copy link
Contributor

exhu commented Aug 2, 2012

vcc 64-bit does not support inline assembler so I get the following errors:

cl : Command line warning D9002 : ignoring unknown option '/arch:SSE2'
astalgo.c
E:\Nimrod\lib\nimbase.h(223) : error C4235: nonstandard
 extension used : '_asm' keyword not supported on this architecture
E:\Nimrod\lib\nimbase.h(223) : error C4235: nonstandard
 extension used : '_asm' keyword not supported on this architecture
E:\Nimrod\lib\nimbase.h(224) : error C2065: 'fld' : undeclared ident
ifier
E:\Nimrod\lib\nimbase.h(224) : error C2065: 'fld' : und
eclared identifier
E:\Nimrod\lib\nimbase.h(224) : error C2146: syntax erro
r : missing ';' before identifier 'flt'

"Inline asm is not supported by Visual C++ on 64-bit machines. Therefore, if you want your code to be 64-bit compatible, you need to use intrinsics." http://msdn.microsoft.com/en-us/library/azcs88h2.aspx

Don't know what places of nimrod this affects, but I've put the following into 'nimbase.h' (line 215) and it compiled (_note _M_X64_)":

#elif (defined(WIN32) || defined(_WIN32) || defined(__WIN32__)) \
   && !defined(__BORLANDC__) && !defined(__POCC__) && !defined(_M_X64)

/*  Win32 doesn't seem to have these functions.
**  Therefore implement inline versions of these functions here.
*/
static N_INLINE(long int, lrint)(double flt) {
  long int intgr;
  _asm {
    fld flt
    fistp intgr
  };
  return intgr;
}

Now it builds.

@Araq Araq closed this as completed Aug 2, 2012
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Feb 9, 2022
187: debug: clean up formatting for the vmgen debugging r=saem a=haxscramper

- Improve formatting for the vmgen code listing reports
- Split VM debuggint defines in two - `nimVMDebugExecute` to trace actually
  executed vm opcodes, and `nimVMDebugGenerate` to see generated code.
- Allow filtering out generated code by proc name, using
  `--define:expandVmListing=vmTarget`
```nim
type
  Obj = object
    charField: char
    intField: int

proc vmTarget(arg: Obj) =
  echo arg.charField.int + arg.intField

static:
  vmTarget(Obj())

```

```
nim c --filenames:canonical --define:expandVmListing=vmTarget file.nim
```

```
Code listing for vmTarget
  LdConst      r3     $     1279                system.nim(2005, 30)
  LdObj        r6     r1     r0                 file.nim(7, 11)
  NodeToReg    r5     r6     r0                 file.nim(7, 11)
  Conv         r6     r5     int   char         file.nim(7, 21)
  LdObj        r7     r1     r1                 file.nim(7, 31)
  NodeToReg    r5     r7     r0                 file.nim(7, 31)
  AddInt       r4     r6     r5                 file.nim(7, 26)
  IndCallAsgn  r2     r3     nim-lang#2                 file.nim(7, 26)
  Echo         r2     r1     r0                 file.nim(7, 26)
  Ret          r0     r0     r0                 file.nim(7, 8)
  Eof          r0     r0     r0                 file.nim(7, 8)
```

188: separate documentation publishing from building r=saem a=alaviss

Since docs were published as a part of the main CI run, we were forced
to re-run CI on devel even though bors has performed the check and built
the documentation. This wastes resources especially since our test
matrix is expanding.

This commit implemented a separate publisher that publishes artifacts
built during staging (currently docs). The publisher uses a pull
architecture, that is, to query producers and obtain necessary artifacts
from them.

Main CI will now always build and upload generated documentation, which
has a nice bonus of allowing us to review docgen changes more throughly
in PRs.

An another adjustment made is that the "Edit" link will now be
hard-coded to the `devel` branch instead of being inferred from the
branch being built on. This lets us reuse docs built during the time
spent in staging branch.

Closes nim-lang#182 

Co-authored-by: haxscramper <haxscramper@gmail.com>
Co-authored-by: Leorize <leorize+oss@disroot.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants