1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-30 05:10:37 +00:00

Merge pull request #72 from Kobolticus/development

Adds _SHR and _SHL functions for bit shifting (right and left).
This commit is contained in:
Fellippe Heitor 2018-10-30 00:13:10 -03:00 committed by GitHub
commit 48ddedb080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View file

@ -29741,3 +29741,9 @@ void reinit_glut_callbacks(){
#endif
}
int64 _SHL(int64 a1,int b1)
{return a1<<b1;}
int64 _SHR(int64 a1,int b1)
{return a1>>b1;}

View file

@ -617,6 +617,9 @@ extern uint64 string2ui64(qbs*str);
extern float string2s(qbs*str);
extern double string2d(qbs*str);
extern long double string2f(qbs*str);
//Cobalt(aka Dave) added the next 2 lines
extern int64 _SHR(int64 a1, int b1);
extern int64 _SHL(int64 a1, int b1);
#ifndef QB64_WINDOWS
extern void Sleep(uint32 milliseconds);
extern void ZeroMemory(void *ptr,int64 bytes);

View file

@ -3343,3 +3343,21 @@ id.callname = "func__autodisplay"
id.args = 0
id.ret = LONGTYPE - ISPOINTER
regid
clearid
id.n = "_SHR"
id.subfunc = 1
id.callname = "_SHR"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
regid
clearid
id.n = "_SHL"
id.subfunc = 1
id.callname = "_SHL"
id.args = 2
id.arg = MKL$(INTEGER64TYPE - ISPOINTER) + MKL$(LONGTYPE - ISPOINTER)
id.ret = INTEGER64TYPE - ISPOINTER
regid