COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 06-04-2011, 10:14 AM   #1
liteon
Human being with feelings
 
liteon's Avatar
 
Join Date: Apr 2008
Posts: 510
Default [eel2]: xor and compliment operators

i wrote these addition around 3+ mounts ago but forgot about it to be honest.
i think that the cockos support / submission email addresses disregarded (or missed) the email i've sent, but on the other hand i may have missed a possible reply.

if you are using eel2 by any chance this is a patch that will add xor and not operators in these forms:
Code:
a = b ` c; // b xor c. ^ is taken by pow
a `= b // b xor= c
a = ~b // not b
a ~= b // this one does not make much sense. does same as the one above.
the ppc support was tricky, as i had to run a qemu ppc-linux image that booted for 15 minutes and had a lets say, "not very compatible" compiler, which pretty much rendered the entire library broken. a couple of small examples would be -mregnames and the memory buffer which required way to many modifications, so i've disabled it while testing. the x64 support is simply following a "copy-paste from x86" scheme with changing some of the architecture specific mnemonics slightly...and thus x64 isn't tested at all.

http://dl.dropbox.com/u/1627980/reap...perators.patch

--

Last edited by liteon; 11-09-2011 at 02:39 PM.
liteon is offline   Reply With Quote
Old 11-09-2011, 03:30 PM   #2
liteon
Human being with feelings
 
liteon's Avatar
 
Join Date: Apr 2008
Posts: 510
Default

Quote:
Originally Posted by v4.11rc2pre1 - November 7 2011
+ JS: now supports << and >> (bitwise shift) operators -- note parameters are converted to integer so 3.4 << 2 == 12, etc
http://dl.dropbox.com/u/1627980/reap...mod_091111.zip
includes updated files for eel2 to add xor (+ xor=), not (+ redundant not=), <<=, =>>.

not sending patches, since git diff and other tools make a mess out of it (for other WDL files as well); independent of text editors it seems... there is something very wrong with line endings and encoding in there. i'm pretty sure UNIX/UTF-8 for *all* WDL files, a consistent coding style and whitespaces, might be a very good idea!

the 3 character shift assignment operators are solved like:
Code:
...
DECL_ASMFUNC(shl)
DECL_ASMFUNC(shr)
DECL_ASMFUNC(shl_op)
DECL_ASMFUNC(shr_op)
Code:
static struct 
{
  char op[3];
  char lscan,rscan;
  char *func;
} preprocSymbols[] = 
{
{{'+','='}, 0, 3, "_addop" },
...
{{'<','<','='}, 0, 3, "_shlop" },
{{'>','>','='}, 0, 3, "_shrop" },
Code:
...
if (preprocSymbols[n].op[1]) expression++;
if (preprocSymbols[n].op[2]) expression++;
Code:
compiler/platform spec. assembly in asm-nseel-*
these are only tested on msvc-x86, as i don't have x86-apple machine (for a build without mods for x86-gcc) and couldn't be arsed to boot the qemu ppc-linux and transfer files via ftp for each test iteration.

should work in general, if the logic is correct, but there might be typos that break the build or execution...

--
liteon is offline   Reply With Quote
Old 11-09-2011, 03:55 PM   #3
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

git diff --ignore-all-space usually takes care of things.. see if you can give me a patch with that?
Justin is offline   Reply With Quote
Old 11-09-2011, 04:33 PM   #4
liteon
Human being with feelings
 
liteon's Avatar
 
Join Date: Apr 2008
Posts: 510
Default

just sent to submissions at cockos,
git format-patch --ignore-all-space (or -w) seems to do the trick.
it added asm-nseel-x64.obj to the commit though and i haven't changed that.

there might be some leftovers of debug code in the patch, or it might be completely broken in the end...

let me know if its any good.

--
liteon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:44 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.